rem run as follows: rem batch file cruise station rem oc346.bat oc346 005 rem rem if get error in datcnv, it means you havn't set up the PERL path rem CAN'T OPEN fname.HEX if '%1' == '' goto err1 if '%2' == '' goto err2 rem goto last rem type go.txt rem pause rem echo off rem srcdir=c:\cruise\%2 rem outdir=c:\cruise\%2\process rem set SRCDIR=d:\oc344\ctd set SRCDIR=c:\cruise\oc346 rem set OUTDIR=d:\oc344\ctd\reproc set OUTDIR=c:\cruise\oc346\ctd\process rem set PGMDIR=d:\oc344\ctd\pgms set PGMDIR=c:\cruise\oc346\pgms rem NOTE: to remain in the directroy one starts in, should do this rem with a call stmt rem takes a single SEABIRD cast and runs the chain of processing programs rem run as follows: go rem eg. go oc333 oc333 002 rem After "SPLIT" the downgoing & upgoing casts are respectively in rem "fname.cdn" and "fname.cup" rem NOTE: Must previously set up path to contain seasoft routines. rem Can do this (1 time only) by first running "SEA_PATH.BAT" rem Also, must have set up the ".cfg" files for each program rem you want to run in this directory! rem change to directory to process in cd %OUTDIR% rem need data file in THIS directory, so copy it copy %SRCDIR%\%1%2.dat %OUTDIR% /v if not exist %1%2.dat goto err3 rem also need file of constants - copy replica & modify for conductivity rem offset appropriate for station being processed perl -w %PGMDIR%\reprc.plx %SRCDIR%\%1rep.con %1%2 > %1%2.con if not exist %1%2.con goto err4 datcnv -i%OUTDIR%\%1%2 -c%OUTDIR%\%1%2.con -o%OUTDIR%\%1%2 if errorlevel 1 goto abort rem manual states that SBE 911 systems should not have any "wild" data rem points and wildedit may be skipped rem wildedit -ic:\cruise\%2\process\%2%3 -oc:\cruise\%2\process\%2%3 wildedit -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 if errorlevel 1 goto abort rem celltm celltm -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 if errorlevel 1 goto abort rem filter filter -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 if errorlevel 1 goto abort rem loopedit loopedit -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 if errorlevel 1 goto abort rem binavg -ic:\cruise\%2\process\%2%3 -oc:\cruise\%2\process\%2%3 rem binavg -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 -vp1??????? binavg -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 if errorlevel 1 goto abort rem rossum -ic:\cruise\%2\process\%2%3 -oc:\cruise\%2\process\%2%3 rem rossum -i%OUTDIR\%1%2 -o%OUTDIR%\%1%2 rossum -i%OUTDIR%\%1%2 -c%OUTDIR%\%1%2.con -o%OUTDIR%\%1%2 rem if errorlevel 1 goto abort rem !!!! **** !!!! probably don't want to abort (cast may not have bottle) !! rem no longer need copy of data file in THIS directory, so delete it del %OUTDIR%\%1%2.dat rem derive -ic:\cruise\%2\process\%2%3 -oc:\cruise\%2\process\%2%3 -cc:\cruise\%2\process\%1.con derive -i%OUTDIR%\%1%2 -o%OUTDIR%\%1%2 -c%OUTDIR%\%1%2.con if errorlevel 1 goto abort rem split -nd -ic:\cruise\%2\process\%2%3 -odc:\cruise\%2\process\down -ouc:\cruise\%2\process\up rem copy c:\cruise\%2\process\down.cnv c:\cruise\%2\process\%2%3.cdn rem copy c:\cruise\%2\process\up.cnv c:\cruise\%2\process\%2%3.cup split -nd -i%OUTDIR%\%1%2 -od%OUTDIR%\down -ou%OUTDIR%\up copy %OUTDIR%\down.cnv %OUTDIR%\%1%2.cdn copy %OUTDIR%\up.cnv %OUTDIR%\%1%2.cup del down.cnv del up.cdn if errorlevel 1 goto abort rem run PERL script to make seperate files of header & data rem # perl -w hdr_cdn.plx ..\..\ctd\oc321015.cdn perl -w %PGMDIR%\hdr_cdn.plx %OUTDIR%\%1%2.cdn > %1%2.con goto last rem echo "Press -c to exit or to distribute processed data to april on Oceanus." rem pause rem copy c:\cruise\%2\%2%3.dat f:\ rem copy c:\cruise\%2\%2%3.con f:\ rem copy c:\cruise\%2\%2%3.hdr f:\ rem copy c:\cruise\%2\process\%2%3.cup f:\process rem copy c:\cruise\%2\process\%2%3.cdn f:\process rem copy c:\cruise\%2\process\%2%3.cnv f:\process rem copy c:\cruise\%2\process\%2%3.btl f:\process rem print f:\process\%2%3.btl goto end :abort echo "batch process interrupted by user" :end rem echo "Press -c to exit or to return to SEASAVE." goto last :err1 echo "ERR1 Must give cruise and station (oc333 006) in command line" goto last :err2 echo "ERR2 Must give cruise and station (oc333 006) in command line" goto last :err3 echo "ERR3 ".dat" file MUST exist in this directory" goto last :err4 echo "ERR4 ".con" file MUST exist in this directory" goto last :last rem change back to program directory cd %PGMDIR%