sim.single_run {isobxr} | R Documentation |
Run a single isotope box-model simulation
Description
A function to run the isobxr stable isotope box model,
assessing the design of the model and automatically running solve_numerically
or solve_analytically
depending on system design.
Usage
sim.single_run(
workdir,
SERIES_ID,
flux_list,
coeff_list,
t_max,
n_steps,
isobxr_master_file = "0_ISOBXR_MASTER",
suppress_messages = FALSE,
export.diagrams = FALSE,
export.delta_plot = FALSE,
export.data_as_csv_xlsx = FALSE,
plot.time_as_log10 = TRUE,
plot.time_unit = NULL,
show.delta_plot = TRUE,
inspect_inputs = TRUE,
save_outputs = FALSE,
return_data = FALSE,
solver = "auto",
n_zeros_RUN_IDs = 4,
FORCING_RAYLEIGH = NULL,
FORCING_SIZE = NULL,
FORCING_DELTA = NULL,
FORCING_ALPHA = NULL,
COMPOSITE = FALSE,
COMPO_SERIES_n = NaN,
COMPO_SERIES_FAMILY = NaN,
EXPLORER = FALSE,
EXPLO_SERIES_n = NaN,
EXPLO_SERIES_FAMILY = NaN,
isobxr_master = NULL,
diagram_pdf.widh_height = NULL
)
Arguments
workdir |
Working directory of isobxr excel master file and where output files will be stored if exported by user. (character string) |
SERIES_ID |
Name of the series the run belongs to. |
flux_list |
Name of the list of fluxes and initial box sizes to be used for the run, |
coeff_list |
Name of the list of fractionation coefficients to be used for the run, |
t_max |
Run duration, given in the same time units as unit declared in CONSTANTS |
n_steps |
Number of calculation steps. |
isobxr_master_file |
Name of isobxr excel master file. |
suppress_messages |
If TRUE, hides all information and warning messages regarding run. |
export.diagrams |
If TRUE, exports box-model flux and fractionation diagrams as pdf. |
export.delta_plot |
If TRUE, exports delta and size time evolution plots of the evolution
of the system, as pdf. |
export.data_as_csv_xlsx |
If TRUE, exports all results and run conditions as csv and xlsx files, |
plot.time_as_log10 |
If TRUE, uses logarithmic time scale in plot. |
plot.time_unit |
Time unit to use on plot if different from native time unit. |
show.delta_plot |
If TRUE, prints delta and size time evolution plots in R. Default is TRUE. |
inspect_inputs |
If TRUE, inspects and proof checks format of input taken from
isobxr excel master file. |
save_outputs |
If TRUE, saves all run outputs to local working directory (workdir). |
return_data |
If TRUE, returns all data (inputs and outputs) as a list. |
solver |
Determines what solver to used: "analytical" or "numerical". |
n_zeros_RUN_IDs |
Number of figures used in iteration of RUNs of a given series (SERIES_ID). |
FORCING_RAYLEIGH |
OPTIONAL |
FORCING_SIZE |
OPTIONAL |
FORCING_DELTA |
OPTIONAL |
FORCING_ALPHA |
OPTIONAL |
COMPOSITE |
NOT TO BE USED IN SINGLE RUN |
COMPO_SERIES_n |
NOT TO BE USED IN SINGLE RUN |
COMPO_SERIES_FAMILY |
NOT TO BE USED IN SINGLE RUN |
EXPLORER |
NOT TO BE USED IN SINGLE RUN |
EXPLO_SERIES_n |
NOT TO BE USED IN SINGLE RUN |
EXPLO_SERIES_FAMILY |
NOT TO BE USED IN SINGLE RUN |
isobxr_master |
isobxr_master list of input dataframes formatted by
|
diagram_pdf.widh_height |
Vector of width and height in inches of the pdf diagrams. |
Value
A results data set as a list containing the following components:
-
inputs input data:
-
CONSTS data frame of all run specific constants.
-
INITIAL data frame of delta and sizes at t = 0 in all boxes.
-
FLUXES data frame of all fluxes intensities (row ID: FROM / col ID: TO)
-
COEFFS data frame of all fractionation coefficient values (row ID: FROM / col ID: TO)
-
BOX_META data frame of box specific metadata (e.g., flux balance, residence times, layout position )
-
bx.groups list of box names grouped by relevant categories (e.g., disconnected boxes, infinite boxes)
-
LOG data frame of run specific LOG excerpt.
-
-
outputs output data:
-
solver
-
final_state
-
delta_vs_t
-
size_vs_t
-
for analytical solutions
-
diffeq_solutions solutions of differential equations,
including relaxation times, eigenvalues, constants, eigenvectors
-
-
-
paths list of run specific paths
Examples
## Not run:
sim.single_run(workdir = "/Users/username/Documents/1_ABC_tutorial",
SERIES_ID = "1_ABC_balanced_closed",
flux_list = "Fx1_ABC_bal",
coeff_list = "a1",
t_max = 2500,
n_steps = 2500)
## End(Not run)