Commit 49275cd2 authored by Yvonne Firing's avatar Yvonne Firing
Browse files

dy105 version (original was jr18002), adds uhdas related scripts

parent ce491335
uhdas_02_sync_postprocessing_from_raw
\ No newline at end of file
#!/bin/csh -f
#
# bak in Amsterdam before start of jc184 uhdas trial
# 3 July 2019
#
# 1) rsync proc directory from the local atsea copy to the editing directory
#
# 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 ldir = ~/cruise/data/vmadcp
foreach i (`cat ~/cruise/data/vmadcp/cruise_segments`)
echo
echo
echo syncing
echo ${ldir}/atsea/${i}/proc
echo to
echo ${ldir}/postprocessing/${i}/proc_editing
rsync -auv ${ldir}/atsea/${i}/proc/ ${ldir}/postprocessing/${i}/proc_editing/
echo
echo
end
uhdas_03_copy_asclog_for_editing
\ No newline at end of file
#!/bin/bash
#
# bak in Amsterdam before start of jc184 uhdas trial
# 3 July 2019
#
# This is run as a bash, because we want the quick_adcp.py to run in the
# python 3 environment
#
# This script merges the edits stored in the proc_archive asclog file with
# any stored in the proc_editing file
#
# The combined sorted edits are stored in both of asc and asclog in the proc_editing file
# The editing process takes past input from .asc, and appends new edits to .asclog
#
# List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments
#
# make sure the bash environment is set up
source ~/.bashrc
# no set command in bash
ldir=~/cruise/data/vmadcp
for segname in `cat ~/cruise/data/vmadcp/cruise_segments`
do
pushd ${ldir}/postprocessing/${segname}/proc_editing
for pingtype in `ls -d *`
do
echo ${segname}/${pingtype}
data=0
if test -f ${ldir}/postprocessing/${segname}/proc_editing/${pingtype}/adcpdb/*dir.blk
then
data=1
fi
echo data ${data}
if [ ${data} -eq 1 ]
then
pushd ${ldir}/postprocessing/${segname}/proc_editing/${pingtype}
thisdir=`pwd`
echo working in ${thisdir}
# now fix the asc files
for asctype in abadbin abottom abadprf
do
echo ${asctype}
f1=${ldir}/postprocessing/${segname}/proc_editing/${pingtype}/edit/${asctype}.asclog
f2=${ldir}/postprocessing/${segname}/proc_archive/${pingtype}/edit/${asctype}.asclog
f3=${ldir}/postprocessing/${segname}/proc_editing/${pingtype}/edit/${asctype}.asc
f4=${ldir}/postprocessing/${segname}/proc_editing/${pingtype}/edit/${asctype}.asclog
cat ${f1} ${f2} | sort -u > ${f3}
/bin/cp -p ${f3} ${f4}
done
thisdir=`pwd`
echo quick_adcp.py in ${thisdir}
which quick_adcp.py
quick_adcp.py --steps2rerun apply_edit:navsteps:calib --auto
popd
fi
done
popd
done
uhdas_04_export_nc
\ No newline at end of file
#!/bin/bash
#
# bak in Amsterdam before start of jc184 uhdas trial
# 3 July 2019
#
# This is run as a bash, because we want the adcp_nc.py to run in the
# python 3 environment
#
# This script remakes the contour/os150nb.nc file after dataviewer editing
#
# List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments
#
# make sure the bash environment is set up
source ~/.bashrc
# no set command in bash
ldir=~/cruise/data/vmadcp
for segname in `cat ~/cruise/data/vmadcp/cruise_segments`
do
pushd ${ldir}/postprocessing/${segname}/proc_editing
for pingtype in `ls -d *`
do
echo ${segname}/${pingtype}
data=0
if test -f ${ldir}/postprocessing/${segname}/proc_editing/${pingtype}/adcpdb/*dir.blk
then
data=1
fi
echo data ${data}
if [ ${data} -eq 1 ]
then
pushd ${ldir}/postprocessing/${segname}/proc_editing/${pingtype}
thisdir=`pwd`
echo working in ${thisdir}
thisdir=`pwd`
echo adcp_nc.py in ${thisdir}
which adcp_nc.py
adcp_nc.py adcpdb contour/${pingtype} jc184 ${pingtype}
popd
fi
done
popd
done
uhdas_05_sync_edited_to_archive
\ No newline at end of file
#!/bin/csh -f
#
# bak in Amsterdam before start of jc184 uhdas trial
# 3 July 2019
#
# 1) rsync proc_edited directory back to proc_archive after editing with dataviewer.py -e
#
# List of cruise segments to be processed is found in
# ~/cruise/data/vmadcp/cruise_segments
#
set ldir = ~/cruise/data/vmadcp
#
#
foreach i (`cat ~/cruise/data/vmadcp/cruise_segments`)
echo
echo
echo syncing
echo ${ldir}/postprocessing/${i}/proc_editing
echo to
echo ${ldir}/postprocessing/${i}/proc_archive
rsync -av ${ldir}/postprocessing/${i}/proc_editing/ ${ldir}/postprocessing/${i}/proc_archive/
echo
echo
#
end
#
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