A function to plot the relaxation of isotope ratios in a system, including characteristic times

plot_relaxation(
  workdir,
  flux_list,
  coeff_list,
  spiked_boxes,
  spike.max_delta = 100,
  n_steps = 10000,
  hidden_boxes = NULL,
  show.residence_time = TRUE,
  show.facets = FALSE,
  time_landmarks = NULL,
  time_as_log10 = TRUE,
  isobxr_master_file = "0_ISOBXR_MASTER",
  time.resolution_cut = NULL
)

Arguments

workdir

Working directory of isobxr excel master file and where output files will be stored if exported by user. (character string)

flux_list

Name of the list of fluxes and initial box sizes to be used for the run,
calling (by its header name) a single column of the FLUXES sheet of the isobxr excel master file.
(character string)

coeff_list

Name of the list of fractionation coefficients to be used for the run,
calling (by its header name) a single column of the COEFFS sheet of the isobxr excel master file.
(character string)

spiked_boxes

Vector of box names ("BOX_ID") to be spiked.
If several boxes are listed, initial spike will be evenly distributed from 0 to spike.max_delta value.

spike.max_delta

Value of the maximum spike isotope composition
(in permil on the delta scale).
Default is 100 permil.

n_steps

Number of calculation steps. Determines the resolution of the run.
Default is 10000.

hidden_boxes

Vector of boxes to hide from plots.
For instance c("SOURCE", "SINK").
Default is NULL.

show.residence_time

If TRUE, displays box-specific residence times on plot.
Default is FALSE.

show.facets

If TRUE, displays results in box-specific facets.
Default is FALSE.

time_landmarks

Vector of time landmarks to display on x-axis (numerical values).

time_as_log10

If TRUE, uses logarithmic time scale in plot.
Default is TRUE.

isobxr_master_file

Name of isobxr excel master file.
Default is "0_ISOBXR_MASTER".

time.resolution_cut

Time below which resolution is increased. Default is NULL.

Value

A plots showing the evolution of the isotopic ratios in the system until full relaxation,

defined as the maximum relaxation time multiplied by 10.

Examples

if (FALSE) {
plot_relaxation(workdir = "/Users/username/Documents/1_ABC_tutorial",
                flux_list = "Fx6_ABC_open_bal",
                coeff_list = "a0",
                n_steps = 1000,
                spiked_boxes = c("SOURCE"))
}