#!/usr/bin/env bash set -uxa export DUMPOPS=${DUMPJB:-$HOMEdump/ush/dumpjb} export EXECcfs=${EXECcfs:-$HOMEcfs/exec} export ARGOTANK=${ARGOTANK:-$DCOMROOT} export ARGODUMP=${ARGODUMP:-$EXECcfs/bufr_argodump} export DUPC=OFF if [[ $3 = tesac && $# -eq 3 ]]; then # make argo dump look like tesacs and cat with other tesacs rm -f tesac.ibm tesac.org argomods $DUMPOPS $1 $2 tesac >/dev/null 2>&1 # tesac TANK=$ARGOTANK $DUMPOPS $1 $2 031 005 >/dev/null 2>&1 # argos unset FORT20 FORT21 FORT50; rm -rf fort.* ln -sf 031.ibm fort.20 ln -sf argomods fort.50 $ARGODUMP >/dev/null 2>&1 [[ -s tesac.ibm ]] && cp tesac.ibm tesac.org [[ -s argomods ]] && cat argomods >> tesac.ibm echo ls -l tesac.org ls -l 031.ibm ls -l argomods ls -l tesac.ibm echo elif [[ $3 = dbuoy && $# -eq 3 ]]; then # dump marine subtypes 002 and 103 into dbuoy collective $DUMPOPS $1 $2 001 103 >/dev/null 2>&1 mv 001.ibm dbuoy.ibm else $DUMPOPS $* fi