BtlVsCTD (Bottle vs CTD) is a Windows program developed by SIO-CalCOFI. It uses Seasoft-generated CTD asc files and bottle data files (CalCOFI's sta.csv or IEH format).

In Step 1: the program averages 4 seconds of CTD sensor data prior to bottle closure then merges it with corresponding bottle data into a single csv. After removing fliers & mistrips, regressions for O2, Chl-a, & NO3 are calculated from the remaining bottle data vs sensor measurements.

In Step 2: the regression coefficients are applied to Seasoft-processed 1m binavg CTD data generating additional columns of bottle-corrected data.

Basic setup: BtlVsCTD uses a suite of in-house software to generate the necessary files:

  • CTDBackup: programmed to backup & zip CTD cast files immediately after a cast, CTDBackup also generates a basic file of bottle depth data from the .mrk or .btl file for use by CESL.
  • CESL: imports the sample log file generated by CTDBackup, then tabulates & annotates bottle samples, generates a sta.csv (bottle info) and casts.csv (sta info).
  • DECODR: processes the bottle samples: salts, oxygens, nutrients, chlorophylls, and prodo samples; data generated populates the appropriate column(s) in the sta.csv when "update sta.csvs" is selected.

"Sta.csvs" are created from the CTD .mrk or .btl files by CTDBackup & CESL. When bottle samples are process using DECODR, salts, nutrients, chlorophylls, and oxygens, data populate the sta.csvs for each cast.

Step 1 - BtlVsCTD uses an un-averaged CTD asc file, processed by Seasoft and the .bl file to find the bottle-trip-scan starting point. It averages 4 (or more, user-entered) seconds of data prior to bottle closure then merges the CTD data with the bottle data from sta.csv or IEH so regressions can be derived such as seen here:

http://www.calcofi.com/cruises/2015-cruises/calcofi-1507oc/575-1507oc-ctd-processing-summary.html

Refer to the Data formats page for file formats required: http://www.calcofi.com/references/data-formats.html

Once the correction coefficients have been derived interactively in Excel. BltVsCTD Step 2 applies them to 1m binavg upcast & downcast CTD asc data, generating the "Cruise_Corr" data columns.
Individual station regressions, using only bottle samples from a particular station, are also derived dynamically by BtlVsCTD. This results in "Sta_Corr" data and is considered the best bottle-corrected CTD data we generate. But this requires at least 10 bottle samples per station to work well. Otherwise, the cruise-corrected CTD data are preferred. This process is repeated once final bottle data are available.

BtlVsCTD has several other module that edit & update the CTD.csvs generated by merging CTD with bottle data.

BtlVsCTD has been around a long time and is written in Visual Basic 6. It has evolved over the years, originally using IEH-formatted data and now our sta.csvs format. This program is pretty specific to CalCOFI's file structure so it may require quite a bit of work to adapt to other datasets.

Example Step 2 Instructions - see CTD Data Processing Protocol

BTLvsCTD: Run Step 2:Correct CTD ASC data then merge w/Btl Data, DB csv out. Preliminary sta.csvs in the CSV dir or IEH (bigieh or arch.ieh) in the same dir as the CTD ASC files are required.  YYMMEvents.CSV (corrected if available) also needs to be in CTD ASC dir.  It is important that the Event file, if available, is cleaned up and complete. Order occupied, CTD at Depth event number, line and station numbers need to be in order & correct.  Every CTD station requires a "CTD at Depth" event.  If an event was not logged one needs to be added, in doing so the new event number will have an added decimal increment of 0.1 per event.

Step 2: File Selection - Navigate to the ASC folder and select all u*.ASC files.  The d*.ASC files will be automatically processed concurrently.  The leading d or u and trailing box are used to correctly parse the ASC file name to retrieve cruise and station numbers.

Step 2: Sensor Configuration - Using SBE CON or XMLCON files as a guide fill the Voltage Settings boxes.  If different stations had different configurations  (i.e., sensors were moved to different voltage positions on the CTD) process files individually with the correct fields. If a sensor was only removed from the CTD no changes are necessary as the data will be processed as 0.  Fluorescence multiplier and V0 Setting have no effect.

 

Step 2: IEH and Headers - Check the appropriate box for IEH comparison if IEH was selected on the Main Page. If Sta.csvs are used, ignore any ieh setting. Make sure you check Add Line Sta from hdr.  The other two have no effect (legacy remnants).

 

Step 2: Correction Coefficients - Replace the YYMM with the correct cruise designation by highlighting the YYMM in the Coefficients Set dialog. Check the appropriate boxes and enter the necessary coefficients for the required corrections.  If a correction is not being made do not include and enter 0 in the necessary fields.  Also "Include btl data..." and use the -9.990e-29 Bad Flag value to match SBE bad flags.  Save the coefficient CFG to the cruise's CTD directory.

 

Step 2 will output station CSV files and various combined tabulations of CTD and Bottle data:

  1. YYMM_CTDd.CSV: compilation of all downcast CTD+bottle data, goes into CTD database
  2. YYMM_CTDu.CSV: compilation of all upcast CTD+bottle data, goes into CTD database
  3. YYMM_DBcoeff.CSV: compilation of all regression coefficients used to bottle correct CTD data; spreasheet or database-friendly, single line per up & downcast format
  4. YYMM_DBcoeff_used.txt: compilation of all regression coefficients used to bottle correct CTD data; text format, easy to read but not database or spreadsheet friendly
  5. YYMM_hdr.CSV: spreadsheet or database-friendly compilation of all hdr information in csv format
  6. YYMM_span.CSV: spreadsheet or database-friendly compilation of all sensor range (min - max) information in csv format
  7. YYMM_xmlcoeff.CSV: spreadsheet or database-friendly compilation of all xmlcoeff (sensor calibration & metadata) information in csv format