optimization_rock: Rock optimization

View source: R/optimization_rock.R

optimization_rockR Documentation

Rock optimization

Description

Optimization of rock fragment content

Usage

optimization_rock(
  sf,
  SpParams,
  meteo = NULL,
  local_control = defaultControl(),
  dates = NULL,
  parallelize = FALSE,
  num_cores = detectCores() - 1,
  chunk_size = NULL,
  PLCquantile = 0.9,
  qPLC_target = 12,
  qPLC_tol = 0.5,
  sew_min = 30,
  max_rocks = 99,
  progress = TRUE
)

Arguments

sf

An object of class sf (see spwb_spatial).

SpParams

A data frame with species parameters (see SpParamsMED).

meteo

Input meteorological data (see section details in spwb_spatial).

local_control

A list of control parameters (see defaultControl).

dates

A Date object describing the days of the period to be modeled.

parallelize

Boolean flag to try parallelization (will use all clusters minus one).

num_cores

Integer with the number of cores to be used for parallel computation.

chunk_size

Integer indicating the size of chuncks to be sent to different processes (by default, the number of spatial elements divided by the number of cores).

PLCquantile

Maximum PLC quantile to be calculated across years.

qPLC_target

Target PLC to be achieved (by default 12%).

qPLC_tol

Tolerance of PLC difference to target accepted when finding solution.

sew_min

Minimum soil extractable water (mm) for rock exploration.

max_rocks

Maximum content in coarse fragments allowed for any soil layer.

progress

Boolean flag to display progress information of simulations.

Value

An object of class sf with a modified soil column and an additional column optimization_message with text information about the optimization.

Author(s)

Miquel De Cáceres Ainsa, CREAF

See Also

utils_rockOptimization

Examples


data("example_ifn")
data("examplemeteo")
data("SpParamsMED")
example_subset <- example_ifn[31:32, ]
optimization_rock(example_subset, SpParamsMED, examplemeteo)


emf-creaf/medfateland documentation built on April 17, 2025, 5:43 a.m.