uhdas_04_export_nc 1.13 KB
#!/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} jc191 ${pingtype}

thisdir=`pwd`
echo quick_adcp.py in ${thisdir}
which quick_adcp.py
quick_adcp.py --steps2rerun matfiles --auto

popd
fi
done
popd


done