View source: R/correct.merge.IOP.profile.R
correct.merge.IOP.profile | R Documentation |
Apply corrections and merge data coming from various instruments for a given vertical profile in the water column.
correct.merge.IOP.profile(instrument, parameters)
instrument |
is a list or a data frame of instruments available. For example, instrument = list(ASPH=1, HS6=1, CTD.UQAR=1) |
parameters |
is a list or a data frame with the processing
parameters provided by the user. When called from
|
This is the heart of the Riops package. All the data are red, matched using a unique time frame, corrected and interpolated on a common grid of equally spaced depth. The detailed description of the correction is not described here (To be done in a future version). Here is a summary of the minimum require to run the code succesfully.
The processing parameters are stored in two ascii files named cast.info.dat and cal.info.dat. The former file includes the following parameters
lon is the longitude of the station. It is not used in the processing
it will be in the PDF reporting (see create.report
)
lat in the latitude of the station. It is not used in the processing
it will be in the PDF reporting (see create.report
)
cast is a character string corresponding to either MINIDAS cast number or file extension generated by the WAP from DH4 archive file (e.g. "001")
Time0.CTD is a character string for CTD start time. It will be transformed
into a time stamp using as.POSIXct
and should respect this format "2015-05-06 12:18:01".
However, if NA the program it check in other instruments (e.g. ASPH or BB3) to find the starting
time. If no absolute time is found, the user will be asked to add a time stamp manually in the
cast.info.dat file)
Time0.LISST is a character string for LISST starting time. It will be transformed
into a time stamp using as.POSIXct
and should respect this format "2015-05-06 12:18:01".
However, if NA the program it check in other instruments (e.g. ASPH or BB3) to find the starting
time. If no absolute time is found, the user will be asked to add a time stamp manually in the
cast.info.dat file)
minx is the index of the CTD timer corresponding to the start of the profile.
If NA, the user will be prompted to select click on the start of the profile on a plot
showing the depth versus time. This a call to the function identify
. Once
this is done, the user can adjust the begining of the cast by changing the values in
the cast.info.dat file afterward (won't be prompted if minx!=NA).
maxx is the index of the CTD corresponding to the End of the profile. Similar to minx.
Zint is the depth interval for profile smooting (e.g. 1 will result in a fitted profile every 1 meter)
depth.interval.for.smoothing is the depth interval, in meter, that will
be used to smooth data with the loess function. It will be converted into a "span" value.
(see loess
)
asph.skip is the number or records to skip at the begining of the a-sphere file. This is necessary only when the a-sphere file contains 2 or more profiles. This happens some time when the MiniDAS reset the cast number. Otherwise 0 will fit most situations.
maxbb is a parameter for the backscattering plots generated in the PDF report.
Ndepth.to.plot is the number of spectra along the depth profile to plot in the report. 8 to 12 usually is enough
The calibration information are stored in the cal.info.dat. The file includes the following information (NOTE: any field can be ommited with out problem):
Tref.ASPH is the temperature of pure water used by Hobilabs for the ASPH calibration. In 2010 and 2014 it was 13.2, in 2013 it was 19, in 2016 it was 14.4.
HS6.CALYEAR is the year of the HS6 calibration.
Tref.ACS is the temperature of pure water used by Wetlabs for the ACS calibration. The IML ACs calibration of 2013 was 20.3
scat.correction is the method for the scattering correction of AC-S abssorption (eg : "mckee","zaneveld", "baseline","none")
blank.ASPH is a string for the path of the blank for ASPH as created by
analyse.ASPH.blank
.
blank.ACS is a string for the path of the blank for ACS as created by
analyse.ACs.blank
.
blank.BB9 is a string for the path of the blank for BB9.
blank.BB3 is a string for the path of the blank for BB3.
It retruns a large list with all the raw and corrected data of each instrument The list is also save as IOP.RData format. One or tow additional RData are save to store the interpolated data for the down and up cast respectively (IOP.fitted.down.RData and IOP.fitted.up.RData). The upcast is optional and depends on the user input (parameter maxx).
Simon Belanger
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.