Skip to contents

Convert a argo object into a ctd object. This function may be called by as.ctd() or called directly. In the first case, note that the only as.ctd() parameters that are provided to the present function are the object itself, the index number of the desired profile, and the debug value.

Usage

argo2ctd(argo, profile = NULL, debug = getOption("oceDebug"))

Arguments

argo

an argo object.

profile

an integer specifying the profile to pick within the argo object. If this is not provided, it will be set to 1, and a warning will be issued telling of this setting.

debug

an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

Details

The resultant ctd object has a constructed station name, made by taking the filename stored within argo and appending an underscore character, followed by the profile number. For example, if the filename for argo is D6902967_001.nc and if the profile parameter is 1, then the station number will be D6902967_001_1.

Author

Dan Kelley

Examples

# Read a built-in Argo dataset and convert to a CTD object
# for plotting.
library(oce)
argo <- read.argo(system.file("extdata", "D4902337_219.nc", package = "oce"))
ctd <- as.ctd(argo) # warns of a default 'profile' choice
#> Warning: since 'profile' not given, defaulting to 1
plot(ctd)