plot_hisafe_tstress: Plot crop temperature and temperature stress regions

Description Usage Arguments Value See Also Examples

View source: R/plot.R

Description

Plots histograms of crop temperature and relevant temperature stress regions. If type is 'lue', then hop$cells$cropTemperature (mean crop temperature) is shown in relation to tempStressLue (FTEMP in STICS) regions. If type is 'reprod', then hop$cells$cropMinTemperature (min crop temperature) and hop$cells$cropMaxTemperature (max crop temperature) are shown in relation to tempStressGrainFilling (FTEMPREMP in STICS) regions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plot_hisafe_tstress(
  hop,
  simu.name,
  type = "lue",
  years = "all",
  months = "all",
  cell.ids = "all",
  facet.year = TRUE,
  facet.month = TRUE,
  temin = 0,
  teopt = 10,
  teoptbis = 20,
  temax = 40,
  tminremp = 0,
  tmaxremp = 30,
  shade.color = c("grey50", "grey70", "white")
)

Arguments

hop

An object of class hop.

simu.name

A character string of the SimulationName to plot. Only one simulation can be plotted.

years

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

months

A numeric vector of the months within hop to include. Use "all" to include all available values. Only applies if type is 'lue'. If type is 'reprod', then all days during which grain filling occurs are used.

cell.ids

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

facet.year

A logical indicating whether the plot should be faceted by year. This helps with seeing finer level detail.

facet.month

A logical indicating whether the plot should be faceted by month. Only applies if type is 'lue'.

temin

Minimum threshold temperature for growth in biomass. Only applies if type is 'lue'.

teopt

Optimum temperature for growth in biomass. Only applies if type is 'lue'.

teoptbis

Optimum temperature for growth in biomass (if plateau between teopt and teoptbis). Only applies if type is 'lue'.

temax

Maximum threshold temperature for growth in biomass. Only applies if type is 'lue'.

tminremp

Minimum temperature for grain filling. Only applies if type is 'reprod'.

tmaxremp

Maximum temperature for grain filling. Only applies if type is 'reprod'.

shade.color

A character vector of length 3 indicating the shading colors of the various stress regions. Strings must be a valid color name passed to ggplot2.

Value

A ggplot object.

See Also

Other hisafe plot functions: plot_hisafe_annualcells(), plot_hisafe_bg(), plot_hisafe_cells(), plot_hisafe_monthcells(), plot_hisafe_scene(), plot_hisafe_ts(), plot_hisafe_voxels()

Examples

1
2
3
4
## Not run: 
plot_hisafe_tempstress(hop, "Sim_1")

## End(Not run)

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