insertInst: Insert Pressure from alternate instrument

Description Usage Arguments Details Value Examples

View source: R/adcpToolbox.R

Description

Use the measured pressure from an alternate instrument positioned on the same moooring as the ADCP This has benefits of a more accurate pressure reading which can be translated to depth Note: If the pressure sensor is below the ADCP the mooring separation distance (offset) should be negative.

Usage

1
2
insertInst(adp, var, file = adp[["alternate_pressure_file"]],
  offset = adp[["vertical_seperation"]])

Arguments

adp

adp object into which to insert data

var

variable you wish to pull from other instrument

file

file where data from alternate instrument is stored

offset

the mooring separation between the instruments (in metres)

Details

Extreme caution should be used when applying this function to anything other than pressure as there may be significant differences in values despite only a few metres separation.

Value

adp object with data set completed from alternate sources

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
      #list odf files
odflist <- list.files(path = ".", pattern =  "MADCP*...*00.ODF")

      #read list of odf files into adp object
adp <- odf2adp(odflist)



      #add in raw and netCDF metadata and data to adp objecct
raw <- list.files(path = '.', pattern = "*.000")
nc <- list.files(path = '.', pattern = "*.nc")
adp <- adpCombine(adp, raw, nc)


       #insert microcat pressure data
file <- list.files(path = '.', pattern = "MCTD*...*.ODF")
adp <- insertInst(adp, var = 'pressure', file = file)

Echisholm21/adp documentation built on May 20, 2019, 9:12 p.m.