echo off rem * file: process.bat rem * This batch file processes the ctd data for LMG. It rem * follows the recommended procedure from "ctd data acquisition rem * software" version 4.234, page 12 for "standard processing of rem * SBE 9/11 ctd data with oxygen." This is an at sea processing rem * and should re-evaluated in the office. rem ************************************************************** rem ************************************************************** rem ****The Backupdrive and the Cruise Directory needs to have two rem **** directories in them: rem **** \raw rem **** \process rem ************************************************************** rem ************************************************************** set cruisedir=lmg0203 set backupdrive=d: set station=%1 choice Run post ctd processing for %station% of the cruise(%cruisedir%) if errorlevel 2 goto abort choice /T:Y,30 Where bottles trip on this cast? if errorlevel 1 set bottles=1 if errorlevel 2 set bottles=0 rem * make backup copy of data onto zip drive(D:) choice /T:Y,30 Do you wish to backup the raw files? if errorlevel 2 goto continue echo backing up the %station% files to zip drive %backupdrive%... copy c:\%cruisedir%\raw\%station%.* %backupdrive%\raw :continue rem * if process wasn't terminated, continue processing rem * convert raw data to standard units & compute oxygen echo running datcnv... datcnv -ic:\%cruisedir%\raw\%station% -cc:\%cruisedir%\raw\%station% -oc:\%cruisedir%\process\%station% -exdatcnv.cfg -fb if errorlevel 1 goto abort rem * advance oxygen relative to pressure echo running alignctd... alignctd -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -exalignct.cfg if errorlevel 1 goto abort rem * check for and mark 'wild' data points echo running wildedit... wildedit -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -exwildedi.cfg -bx if errorlevel 1 goto abort rem * conductivity cell thermal mass corection echo running celltm... celltm -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -excelltm.cfg if errorlevel 1 goto abort rem * low pass filter pressure to increase pressure resolution for LOOPEDIT. echo running filter... filter -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -exfilter.cfg if errorlevel 1 goto abort rem * mark scans where the CTD is moving less than the minimum rem * velocity or travelling backwards due to ship roll. echo running loopedit... loopedit -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -bx -exloopedi.cfg -y0.25 if errorlevel 1 goto abort rem * compute oxygen echo copying %station%.con to the process directory... copy c:\%cruisedir%\raw\%station%.con c:\%cruisedir%\process\%station%.con echo running derive for oxygen... derive -ic:\%cruisedir%\process\%station% -eoxygen.cfg -oc:\%cruisedir%\process\%station% -cc:\%cruisedir%\process\%station% if errorlevel 1 goto abort rem average data into bins echo running binavg... binavg -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -exbinavg.cfg if errorlevel 1 goto abort rem derive additional oceanographic parameters echo running derive for hydro... derive -ic:\%cruisedir%\process\%station% -ehydro.cfg -oc:\%cruisedir%\process\%station% -cc:\%cruisedir%\process\%station% if errorlevel 1 goto abort rem split into up and down traces echo running split... split -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\ -exsplit.cfg if errorlevel 1 goto abort rem convert up and down traces to ascii echo running asciiout for downtrace... asciiout -ic:\%cruisedir%\process\d%station% -oc:\%cruisedir%\process\d%station% -exasciiou.cfg if errorlevel 1 goto abort echo running asciiout for uptrace... asciiout -ic:\%cruisedir%\process\u%station% -oc:\%cruisedir%\process\u%station% -exasciiou.cfg if errorlevel 1 goto abort if %bottles%==0 goto backup rem prepare bottle temp and sal file echo running rossum... rossum -ic:\%cruisedir%\process\%station% -oc:\%cruisedir%\process\%station% -cc:\%cruisedir%\process\%station% -exrossum.cfg if errorlevel 1 goto abort :backup rem * make backup copy of post-processed data onto zip drive(%backupdrive%) choice /T:Y,30 Do you wish to backup the post-processed files? if errorlevel 2 goto skip echo backing up the post-processed %station% files to zip drive... copy c:\%cruisedir%\process\%station%.* %backupdrive%\process copy c:\%cruisedir%\process\d%station%.* %backupdrive%\process copy c:\%cruisedir%\process\u%station%.* %backupdrive%\process :skip goto end :abort echo Batch processing interrupted by user goto finished :end echo Done processing station %station% :finished