Learn R Programming

solaR (version 0.47)

C_fBTd: Daily time base

Description

Construction of a daily time base for solar irradiation calculation

Usage

fBTd(mode = "prom",
    year = as.POSIXlt(Sys.Date())$year+1900,
    start = paste('01-01-',year,sep = ''),
    end = paste('31-12-',year,sep = ''),
                   format = '%d-%m-%Y')

Value

This function returns a POSIXct object.

Arguments

mode

character, controls the type of time base to be created. With mode = 'serie' the result is a daily time series from start to end. With mode = 'prom' only twelve days, one for each month, are included. During these 'average days' the declination angle is equal to the monthly mean of this angle.

year

which year is to be used for the time base when mode = 'prom'. Its default value is the current year.

start

first day of the time base for mode = 'serie'. Its default value is the first of January of the current year.

end

last day of the time base for mode = 'serie'. Its default value is the last day of December of the current year.

format

format of start and end.

Author

Oscar Perpiñán Lamigueiro

Details

This function is commonly used inside fSolD.

References

  • Perpiñán, O, Energía Solar Fotovoltaica, 2025. (https://blogs.upm.es/oscarperpinan/libros/esf/)

  • Perpiñán, O. (2012), "solaR: Solar Radiation and Photovoltaic Systems with R", Journal of Statistical Software, 50(9), 1-32, tools:::Rd_expr_doi("10.18637/jss.v050.i09")

See Also

Examples

Run this code
#Average days
fBTd(mode = 'prom')

#The day #100 of the year 2008
BTd = fBTd(mode = 'serie', year = 2008)
BTd[100]

Run the code above in your browser using DataLab