Generate an 'isolines' object representing isopycnals

isopycnal_isolines(
  salinity,
  temperature,
  ref_pressure = 0,
  ref_longitude = NULL,
  ref_latitude = NULL,
  salinity_type = c("practical", "absolute"),
  temperature_type = c("in-situ", "potential", "conservative"),
  trim_freezing = TRUE,
  breaks = pretty,
  n_breaks = 5,
  n_sal = 200,
  n_temp = 200,
  eos = getOption("oceEOS", default = "gsw")
)

Arguments

salinity, salinity_type

A salinity value. Use salinity_type = "absolute" to specify that salinity values are absolute salinities.

temperature, temperature_type

A temperature value. Use temperature_type = "conservative" to specify that these values are not in-situ temperature.

ref_pressure

The pressure that should be used to calculate density contours in dbar.

ref_longitude, ref_latitude

The latitude and longitude that should be used in seawater calculations if eos is "gsw".

trim_freezing

Don't draw contours outside the freezing region.

breaks

A numeric vector or function used to generate breaks from objects.

n_breaks

Passed to breaks if breaks is a function.

n_sal

Number of points with which contours should be approximated on the salinity axis.

n_temp

Number of points with which contours should be approximated on the temperature axis.

eos

The equation of state: one of "unesco" or "gsw". See oce::swRho() for details.

Value

An object returned by isoband::isolines(). The x values of the output refer to salinity and the y values of the output refer to temperature.

Examples

data(ctd, package = "oce") isolines <- isopycnal_isolines(ctd[["salinity"]], ctd[["temperature"]]) plot(ctd[["salinity"]], ctd[["temperature"]])
for (line in isolines) { lines(line) }