Commit 70f5e805 authored by PStar User Account's avatar PStar User Account
Browse files

cleanup to start dy113 (changed this directory name to mexec_exec, and

removed _v3 suffix from others; added backing up mexec_processing_scripts)

 Committer: PStar User Account <pstar@192.168.122.1>

 On branch dy113
 Changes to be committed:

	modified:   commands/mstar_dotcshrc
	new file:   cruisedir_setup_scripts/conf_script_dy113
	modified:   ctd_linkscript
	modified:   mexec_cruise_backup
	deleted:    techsas_linkscript_test
	deleted:    uhdas_01_syncraw2
parent 610443f9
......@@ -12,8 +12,9 @@ alias cp 'cp -i'
alias h history
#add to the search path for shell commands
set shome = /local/users/pstar/programs/mexec-exec
set shome = /local/users/pstar/programs/mexec_exec
#set path = (. $shome/jcr $path)
set path = ($shome/cruise_setup_scripts $path)
set path = ($shome/commands $path)
set path = ($shome/ $path)
#set path = ($shome/rapid $path)
......
#!/bin/csh -f
####### names and directories #######
set mexecloc = '/local/users/pstar/programs' #this is the directory containing general_sw plus mexec and mexec_processing_scripts repositories
set cruiseloc = '/local/users/pstar' #this is the directory where your cruise processing directores live
set cruise = 'dy113'
set CRUISE = 'DY113'
#underway system and ship data remote mount points
#on jcr
###set usys = 'scs'
###set shipudr = '/mnt/data/cruise/jcr/current/scs/Compress'
###set shipcdr = '/mnt/data/cruise/jcr/current/ctd/$CRUISE'
###set shipvdr = '/mnt/data/cruise/jcr/current/adcp'
###set shipldr = '/mnt/data/cruise/jcr/current/ladcp'
###set isladcp = 1
#on cook/disco
set usys = 'techsas'
set shipudr = '/mnt/techsas/$CRUISE/NetCDF'
set shipcdr = '/mnt/CTD'
####### now actually set things up #######
#shouldn't need to change anything below this
if (! -e $cruiseloc/$cruise/mcruise/data) then
mkdir -p $cruiseloc/$cruise/mcruise/data
endif
mkdir -p $cruiseloc/$cruise/mcruise/sw/general_sw
#link to generic cruise directory
#this is just so that you can have $cruiseloc/cruise/data/mexec_processing_scripts on your matlab path in ~/matlab/startup.m and be ready to run m_setup.m for the current cruise
if (-e $cruiseloc/cruise) then
/bin/rm $cruiseloc/cruise
endif
cd $cruiseloc
ln -s $cruise/mcruise cruise
#make links to software and scripts
cd $cruise/mcruise/data
ln -s $mexecloc/mexec_processing_scripts mexec_processing_scripts
cd ../sw
ln -s $mexecloc/mexec mexec
cd general_sw
foreach d1 (`ls $mexecloc/general_sw`)
ln -s $mexecloc/general_sw/$d1 $d1
end
cd ../..
echo "edit linkscripts and possibly other files in mexec-exec"
echo "edit m_setup.m to change data time origin, cruise name"
echo "and possibly some paths e.g. versions of external software packages"
#set up rest of data directory structure
cd data
mkdir -p mexec_housekeeping/version
mkdir mexec_housekeeping/history
mkdir -p collected_files/figures
mkdir -p ctd/RAW_CTD_FILES
mkdir ctd/ASCII_FILES
mkdir ctd/BOTTLE_OXY
mkdir ctd/BOTTLE_SAL
mkdir ctd/BOTTLE_SHORE
mkdir ctd/WINCH
mkdir -p ladcp/ctd
mkdir -p ladcp/ix/checkpoints
mkdir ladcp/ix/raw
mkdir ladcp/ix/DL_GPS
mkdir ladcp/ix/DL_GPS_BT
mkdir ladcp/ix/DL_GPS_BT_SADCP
mkdir ladcp/rawdata
mkdir plots
mkdir station_depths
mkdir -p vmadcp/mproc
mkdir -p vmadcp/postprocessing
mkdir -p vmadcp/atsea
mkdir -p vmadcp/spprocessing
mkdir -p techsas/netcdf_files_links
cd techsas
ln -s /local/users/pstar/mounts/techsas netcdf_files_rawdir_ship
ln -s netcdf_files_rawdir_ship netcdf_files_rawdir
mkdir netcdf_files_rawdir_local
mkdir techsas_link_logs
cd ..
#other directories (for processed underway data) are generated by running m_setup
......@@ -5,34 +5,22 @@
cd /local/users/pstar/cruise/data #mexecloc is replaced with $mexecloc by conf_script_cruise
set cpre = DY111
set cruise = dy111
set cpre = DY113
set cruise = dy113
set ctdloc = /mnt/CTD/CTD/Data/
#rsync -av /mnt/data/jcr/current/ctd/jr18002/*.cnv ctd/ASCII_FILES/
#rsync -av /mnt/data/jcr/current/ctd/jr18002/*.bl ctd/ASCII_FILES/
#rsync -av /mnt/data/jcr/current/ctd/*.ros ctd/ASCII_FILES/
#rsync -av /mnt/data/jcr/current/ctd/jr18002/SBE35/ ctd/ASCII_FILES/SBE35/
rsync -av ${ctdloc}/CTDProData/SS/*.cnv ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/SS/*.bl ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDProData/SS/*.ros ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/SS/*.hex ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/SS/*.XMLCON ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/SS/*.hdr ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDProData/SS/*.btl ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDProData/Tita/*.cnv ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/Tita/*.bl ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDProData/Tita/*.ros ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/Tita/*.hex ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/Tita/*.XMLCON ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/Tita/*.hdr ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDProData/Tita/*.btl ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDProData/*.cnv ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/*.bl ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDProData/*.ros ctd/ASCII_FILES/
rsync -av ${ctdloc}/CTDRawData/*.hex ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/*.XMLCON ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDRawData/*.hdr ctd/RAW_CTD_FILES/
rsync -av ${ctdloc}/CTDProData/*.btl ctd/ASCII_FILES/
cd ctd/ASCII_FILES
foreach i (`ls ${cpre}_???_align_ctm.cnv`)
set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,"_align")-3,3)}'`
set linkfile = ctd_jr18002_${num}_ctm.cnv
set linkfile = ctd_${cpre}_${num}_align_ctm.cnv
if (! -e $linkfile) then
echo Making link $linkfile for raw file $i
ln -s $i $linkfile
......@@ -41,21 +29,13 @@ end
#below could be commented out if T spikes aren't a problem
#foreach i (`ls ${cpre}_???_align.cnv`)
# set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,"_align")-3,3)}'`
# set linkfile = ctd_jr18002_${num}_noctm.cnv
# set linkfile = ctd_${cpre}_${num}_align_noctm.cnv
# if (! -e $linkfile) then
# echo Making link $linkfile for raw file
# ln -s $i $linkfile
# endif
#end
#foreach i (`ls ${cpre}_???_align.cnv`)
# gzip -f $i
#end
#foreach i (`ls ${cpre}_???.cnv`)
# gzip -f $i
#end
foreach i (`ls ${cpre}_???.bl`)
set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".bl")-3,3)}'`
set linkfile = ctd_${cruise}_${num}.bl
......@@ -65,12 +45,15 @@ foreach i (`ls ${cpre}_???.bl`)
endif
end
#cd ../RAW_CTD_FILES
#rsync -av /mnt/data/jcr/current/ctd/jr18002/*.hdr .
#rsync -av /mnt/data/jcr/current/ctd/jr18002/*.hex .
#rsync -av /mnt/data/jcr/current/ctd/jr18002/*.XMLCON .
#rsync -av /mnt/data/jcr/current/ctd/jr18002/*.btl .
#compress files we probably won't need to use
foreach i (`ls ${cpre}_???_align.cnv`)
gzip -f $i
end
foreach i (`ls ${cpre}_???.cnv`)
gzip -f $i
end
#gzip -f *.hex
cd ../RAW_CTD_FILES
gzip -f *.hex
cd ../..
......@@ -43,8 +43,8 @@ echo ------------- >> $backuplog
echo Date `date` >> $backuplog
echo copying login and cshrc >> $backuplog
echo ------ >> $backuplog
#/bin/cp -p ~/.login $root/data/other_backups/dot_login
#/bin/cp -p ~/.cshrc $root/data/other_backups/dot_cshrc
/bin/cp -p ~/.login $root/data/other_backups/dot_login
/bin/cp -p ~/.cshrc $root/data/other_backups/dot_cshrc
echo ------------- >> $backuplog
echo Date `date` >> $backuplog
echo done login and cshrc >> $backuplog
......@@ -53,18 +53,15 @@ echo ------ >> $backuplog
# software
echo ------------- >> $backuplog
echo Date `date` >> $backuplog
echo start copying mexec software >> $backuplog
echo start copying mexec software, shell scripts, scripts >> $backuplog
echo ------ >> $backuplog
cd $root
rsync -a ~/programs/mexec_v3 ${backupdir}/
rsync -a ~/programs/mexec ${backupdir}/
rsync -a ~/programs/mexec_exec ${backupdir}/
rsync -a ~/programs/mexec_processing_scripts ${backupdir}
echo ------------- >> $backuplog
echo Date `date` >> $backuplog
echo done copying mexec software >> $backuplog
echo ------ >> $backuplog
rsync -a ~/programs/mexec-exec ${backupdir}/
echo ------------ >> $backuplog
echo Date `date` >> $backuplog
echo done copying mexec shell scripts >> $backuplog
echo done copying mexec software, shell scripts, scripts >> $backuplog
# backup everything in data
echo ------------- >> $backuplog
......
#!/bin/csh -f
#
# script by bak 3 dec 2014 for cook to allow for techsas files to be sorted into a directory
#
# modded by bak at nocs on eriu for dy031 15 may 2015, modded to run as a crontab task
#* * * * 1,2,3,4,5,6,7 /local/users/pstar/cruise/data/exec/techsas_linkscript >> & /dev/null
echo here
cd /local/users/pstar #~/h # cludge on eriu when pstar home directory is wrong
cd cruise/data/techsas
cd netcdf_files_links
set now = `date +%Y%m%d%H%M%S`
set link_log = /local/users/pstar/cruise/data/techsas/techsas_link_logs/techsas_link_log_${now}
echo " " >>! $link_log
echo `date` >>! $link_log
echo there
foreach techfile (`/bin/ls ../netcdf_files_rawdir/*/*`)
set i1 = `echo $techfile | awk '{print index($1,"/")}'`
set i2 = `echo $techfile $i1| awk '{print substr($1,$2+1)}'`
set i3 = `echo $i2 | awk '{print index($1,"/")}'`
set i4 = `echo $i2 $i3| awk '{print substr($1,$2+1)}'`
set i5 = `echo $i4 | awk '{print index($1,"/")}'`
set linkfile = `echo $i4 $i5| awk '{print substr($1,$2+1)}'`
echo everywhere
if (! -e $linkfile) then
if ( -s $techfile) then
echo here2
set sss = ` /bin/ls -l $techfile`
set ss2 = `echo $sss | awk '{print $5}'`
if ($ss2 > 10000) then
echo " making link $linkfile for raw file $techfile " >>! $link_log
ln -s $techfile $linkfile
else
echo " ignoring $linkfile length $ss2 is less than 10k bytes " >>! $link_log
endif
else
echo " ignoring $linkfile has zero length " >>! $link_log
endif
endif
end
#!/bin/csh -f
#
# bak in Amsterdam before start of jc184 uhdas trial
# 3 July 2019
#
# 1) rsync uhdas data from uhdas server to local machine directory atsea
#
# 2) ensure postprocessing directories exist
#
# If the script hasn't been run recently, there will
# be a lot of files to sync across. The processing on the uhdas
# server updates plenty of things in routine processing every few minutes.
# If the script is then immediately run again, there will be a few files
# that are updated every ping.
#
# List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments
set rdir = ~/mounts/uhdas_data
set ldir = ~/cruise/data/vmadcp
#foreach i (`cat ~/cruise/raw/os75`)
#echo syncing ${i} to ${ldir}
rsync -auv ${rdir}/DY111/raw/ ${ldir}/atsea/raw/
rsync -auv ${rdir}/DY111/rbin/ ${ldir}/atsea/rbin/
#mkdir -p ${ldir}/postprocessing/${i}/proc_editing
#mkdir -p ${ldir}/postprocessing/${i}/proc_archive
#end
#foreach i (`cat ~/cruise/raw/os150`)
#echo syncing ${i} to ${ldir}
#mkdir -p ${ldir}/postprocessing/${i}/proc_editing
#mkdir -p ${ldir}/postprocessing/${i}/proc_archive
#end
#echo end of syncing ${i} to ${ldir}
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