Read in Boca Rio Manta time series, 2021-11-03 to 2022-04-28, calibration logs, back-calibrate RV values, and recalculate TRYP and CDOM values from the RV values and a “stable” calibration based on long-term mean RV-TYRP values for the Boca Rio sonde (SN 4105).

  1. Read in Boca Rio Manta data
##             Date.time Temperature   pH ORP Depth  Cond TURB  HDO CDOM
## 1 2021-10-28 10:15:00       15.08 7.84 197  0.56 48810 1.84 7.11 69.3
## 2 2021-10-28 10:30:00       15.14 7.86 192  0.56 49400 1.86 7.37 52.6
## 3 2021-10-28 10:40:00       15.38 7.78 184  0.56 49060 1.51 5.75 52.9
## 4 2021-10-28 10:50:00       15.20 7.86 185  0.56 49580 1.57 6.79 47.5
## 5 2021-10-28 11:00:00       15.22 7.86 185  0.56 49340 0.91 7.05 52.9
## 6 2021-10-28 11:10:00       15.56 7.86 187  0.56 48800 1.82 7.32 64.9
##   Chlorophyll TRYP
## 1         1.8 30.6
## 2         1.9 24.0
## 3         1.8 25.6
## 4         1.8 27.2
## 5         2.0 24.9
## 6         2.2 29.0
## [1] "2021-10-28 10:15:00 PDT" "2022-04-28 17:30:00 PDT"

Plot time series for QAQC

Plot conductivity (identifies when sonde is dry)

Plot regular time series of turb, cond, tryp, cdom. Vertical Blue line is autosampler deployment data at Boca Rio (dry weather conditions, with xborder sewage flow

Load in QAQC notes

Make sure it worked by plotting resulting time series on top of original

Read in Boca Rio cal logs

Plot time series with calibration dates on top Zoom into a specific date range

Plot all time series together, with calibration dates in purple to check for discontinuities Discontinuities could be due to cleaning, so not always a problem.

##         manta             date sensor serial_no units          rv    old new
## 49 MT01204105 10/15/2021 11:05   TRYP   1204105   ppb 0.014839500 124.80 100
## 50 MT01204105 10/15/2021 11:09   TRYP   1204105   ppb 0.005687714  11.38   0
## 51 MT01204105 12/21/2021 13:16   TRYP   1204105   ppb 0.016559330 118.79 100
## 52 MT01204105 12/21/2021 13:16   TRYP   1204105   ppb 0.005000000   0.00   0
## 63 MT01204105  1/21/2022 13:11   TRYP   1204105   ppb 0.011152630  50.26 100
## 64 MT01204105  1/21/2022 13:11   TRYP   1204105   ppb 0.005000000   0.00   0
##    srf comment           Date.time       Date
## 49 100         2021-10-15 11:05:00 2021-10-15
## 50 100    Done 2021-10-15 11:09:00 2021-10-15
## 51 100    Done 2021-12-21 13:16:00 2021-12-21
## 52 100  Filler 2021-12-21 13:16:00 2021-12-21
## 63 100    Done 2022-01-21 13:11:00 2022-01-21
## 64 100  Filler 2022-01-21 13:11:00 2022-01-21

## [1] "No zero point in the calibration.  Assuming RV value at new calibration value is zero"

## [1] "More than 2 calibration points"

##         manta             date sensor serial_no units        rv     old new srf
## 43 MT01204105  10/15/2021 9:17   CDOM   1204105   ppb 0.1387432   60.36 300 100
## 55 MT01204105 12/21/2021 13:41   CDOM   1204105   ppb 0.5773174 1280.83  NA 100
## 56 MT01204105 12/21/2021 13:48   CDOM   1204105   ppb 0.6220524  323.43 300 100
## 57 MT01204105 12/21/2021 13:48   CDOM   1204105   ppb 0.0000000    0.00   0 100
##                                      comment           Date.time       Date
## 43                                      Done 2021-10-15 09:17:00 2021-10-15
## 55 300ppb..set to NA for back-calculating RV 2021-12-21 13:41:00 2021-12-21
## 56                                      Done 2021-12-21 13:48:00 2021-12-21
## 57                                    Filler 2021-12-21 13:48:00 2021-12-21

## [1] "No zero point in the calibration.  Assuming RV value at new calibration value is zero"

## [1] "No zero point in the calibration.  Assuming RV value at new calibration value is zero"

## [1] "No zero point in the calibration.  Assuming RV value at new calibration value is zero"

## [1] "No zero point in the calibration.  Assuming RV value at new calibration value is zero"

##         manta             date sensor serial_no units        rv    old    new
## 47 MT01204105 10/15/2021 10:11   TURB   1204105   FNU 0.2486750 178.10  166.6
## 48 MT01204105 10/15/2021 10:17   TURB   1204105   FNU 0.0212513   0.53    0.0
## 58 MT01204105 12/21/2021 13:55   TURB   1204105   NTU 1.1554700 859.90 1000.0
## 62 MT01204105 12/21/2021 14:26   TURB   1204105   NTU 0.2026790 153.30  166.6
## 67 MT01204105  1/21/2022 13:30   TURB   1204105   FNU 0.8833720 817.60  160.0
## 69 MT01204105   2/18/2022 9:52   TURB   1204105   NTU 0.1426940  22.39  100.0
## 70 MT01204105  3/16/2022 14:54   TURB   1204105   FNU 0.1346430  93.82  100.0
## 71 MT01204105  4/13/2022 10:40   TURB   1204105   FNU 0.1226410  89.24  100.0
##    srf   comment           Date.time       Date
## 47 N/A           2021-10-15 10:11:00 2021-10-15
## 48  88      Done 2021-10-15 10:17:00 2021-10-15
## 58 113      Done 2021-12-21 13:55:00 2021-12-21
## 62 111 Done/Quit 2021-12-21 14:26:00 2021-12-21
## 67  22      Done 2022-01-21 13:30:00 2022-01-21
## 69 100      Done 2022-02-18 09:52:00 2022-02-18
## 70 107      Done 2022-03-16 14:54:00 2022-03-16
## 71 120      Done 2022-04-13 10:40:00 2022-04-13
## Warning in xy.coords(x, y, xlabel, ylabel, log): 3 y values <= 0 omitted from
## logarithmic plot

Recalculate TRYP, CDOM from mean RV-TRYP/CDOM relationships

Plot and Zoom to sampling time

Plot and Zoom to sampling time, CDOM

Write to a new file