simu.star.app: Calculate simulated silhouette to area ratios from 'Ahmes'...

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/simu.star.app.R

Description

This is a version of simu.star function that only works with the output of 'Ahmes' 1.0. simu.star.app() re-calculates the percentage of potential exposure of flat, tilted surfaces to direct solar radiation with different custom settings of location and time.

Usage

1
2
3
simu.star.app(x, lat, long, tz, o.format = NULL, c.hour = NULL,
  c.date = NULL, c.long = NULL, c.lat = NULL, c.tz = NULL, LA = NULL,
  details = FALSE)

Arguments

x

Output of 'Ahmes' 1.0. A .csv file.

lat

A vector with the latitude of each observation in decimal format. If all observations correspond to the same latitude, lat can be introduced directly as a single number (see examples).

long

A vector with the longitude of each observation in decimal format. If all observations correspond to the same longitude, long can be introduced directly as a single number (see examples).

tz

A vector with the time zone of each observation. If all observations correspond to the same time zone, tz can be introduced directly as a single number (see examples). Time zones located at the West of Greenwich are negative, and at the East are positive; e.g., for Colombia, tz = -5; for Reunion Island, tz = 4.

o.format

A character indicating the date format in the input data. It is similar to the argument format in the function as.Date{base}. Defaults to NULL. See details and examples.

c.hour

A vector of custom hours of length equal to or greater than 1. Hours in decimal format, from 0 to 24. Minutes in decimal format, from 0 to 99. E.g., 12:30 should be written as 12.50. If available, seconds should also be specified in decimal format. See fixhour. If all observations correspond to the same local time, local.time can be introduced directly as a single number (see examples).

c.date

A vector of custom dates of length equal to or greater than 1.

c.long

A vector of custom longitude coordinates in decimal format.

c.lat

A vector of custom latitude coordinates in decimal format.

c.tz

A vector of custom time zone/s. Time zones located at the West of Greenwich are negative; e.g., for Colombia, c.tz = -5; for Reunion Island, c.tz = 4.

LA

Indicates whether leaf area data needs to be replicated to match the dimensions of the dataframe corresponding to the custom factors (see 'custom settings' in Details). When LA is specified, all the five custom factors (c.hour, c.date, c.lat, c.long, c.tz) need to be specified (i.e., they should be different from NULL). Defaults to NULL. LA does not affect the calculation of STAR. See examples.

details

Logical. If (details =FALSE), the output of simu.star.app() is a vector with STAR values. If details = TRUE the output is the complete dataset plus a column with STAR values. Defaults to TRUE.

Details

This function calls fixfile internally before calculating STAR. However, it does not modify the original dataset. To have a permanent fixed version of the data, use new.file<-fixfile(your.data). If using new.file within the package, be aware that the argument Ahmes should be set to FALSE.

o.format Needs to be specified if Ahmes = FALSE AND input data format is other than Julian or the default formats handled by as.Date{base} ("%Y/%m/%d" and "%Y-%m-%d"). When Ahmes = TRUE, o.format is not needed because functions of the Ahmes family solve date issues internally.

Custom settings. In the functions of the simu family, the original dataframe is repeated as a block times the number of levels of the custom arguments specified (c.hour, c.date, c.lat, c.long, and c.tz). E.g., if a dataset with 10 observations is to be recalculated at two days of the year, the function will create a new dataframe with 20 rows (10 observation X 2 days). For this reason, LA needs to be specified if the user intends to calculate SAL using the output of simu.star. In addition, the argument details allows the user to visualize the new dataframe created by the function.

Author(s)

Agustina Ventre-Lespiaucq and Silvia Santamaria Bueno.

References

Escribano-Rocafort, A.G., Ventre-Lespiaucq, A.B., Granado-Yela, C., Lopez-Pintor, A., Delgado, J.A., Munoz, V., Dorado, G.A., Balaguer, L. (2014). Simplifying data acquisition in plant canopies- Measurements of leaf angles with a cell phone. Methods in Ecology and Evolution 5:132-140. doi:10.1111/2041-210X.12141.

See Also

fixfile, simu.star, star.app

Examples

1
2
3
4
5
data(olea)
simustar_olea<-simu.star.app(olea,lat=40,long=4,tz=2,
 c.hour=c(8,12,18),c.date=c(1,60,120,180,240))

#simu.star.app()

leafSTAR documentation built on May 2, 2019, 3:35 p.m.