hisafe_budget: Calculate water and nitrogen budgets

Description Usage Arguments Value See Also Examples

View source: R/budget.R

Description

Calculates water and nitrogen budgets See plot_hisafe_cycle_bar for details of each cycle.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
hisafe_budget(
  hop,
  cycle,
  freq = "year",
  doy.start = "sim",
  simu.names = "all",
  years = "all",
  months = "all",
  save.table = TRUE,
  save.plot = TRUE,
  output.path = NULL
)

Arguments

hop

An object of class hop or face.

cycle

A character vector of the cycle to analyze Supported cycles include: 'water', and 'nitrogen.

freq

One of "year", "month", "day".

doy.start

The JulianDay [1-365] on which to start the annual cycle accounting. Use 'sim' to specify the starting JulianDay of the simulation. Only used if freq is "year".

simu.names

A character vector of the SimulationNames within hop to include. Use "all" to include all available values.

years

A numeric vector of the years within hop to include. Use "all" to include all available values.

save.table

Logical indicating whether a table of budget data and calculations should be saved to output.path.

save.plot

Logical indicating whether a plot of the budget excess should be saved to output.path.

output.path

A character string indicating the path to the directory where plots should be saved. If NULL, the experiment/simulation path is read from the hop object, and a directory is created there called "analysis/budgets". The tables and plots will be saved in this directory.

Value

A data.frame (tibble) containing the budget data.

See Also

Other hisafe analysis functions: LER_summary(), LER(), analyze_hisafe(), cycle_summary(), plot_hisafe_cycle_bar(), plot_hisafe_cycle_ts(), stics_budget_comp(), write_hop()

Examples

1
2
3
4
## Not run: 
water.budget <- hisafe_budget(myhop, "water")

## End(Not run)

kevinwolz/hisafer documentation built on Oct. 19, 2020, 4:43 p.m.