library(graphics)
# Monthly average of the mean hourly solar irradiance under cloudless-sky conditions at sea level,
# in June 2000 along a meridian, according to the two different radiation models
lats <- seq(-90, 90, 10)
models <- c("Solar123", "SPLASH")
R_E_moa_MJ.m2.hr1 <- matrix(nrow = 2, ncol = length(lats), dimnames = list(models, lats))
R_E_moa_MJ.m2.hr1[1, ] <- cliAvgDlySolIrrPoints(lats, elv = 0,
aprchTR = "hourly")$R_E_moa_MJ.m2.hr1[, "Jun"]
R_E_moa_MJ.m2.hr1[2, ] <- cliAvgDlySolIrrPoints(lats, elv = 0, aprchSIM = "SPLASH",
aprchTR = "hourly")$R_E_moa_MJ.m2.hr1[, "Jun"]
cols <- c("black", "green")
matplot(t(R_E_moa_MJ.m2.hr1), type = "l", lwd = 2, col = cols, xaxt = "n",
xlab = "Geographical latitude (degrees)",
ylab = "Mean hourly solar irradiance (MJ m-2 hr-1)")
axis(1, at = seq(1, ncol(R_E_moa_MJ.m2.hr1)), labels = colnames(R_E_moa_MJ.m2.hr1))
legend(1, 2, legend = rownames(R_E_moa_MJ.m2.hr1), col = cols, lty = 1 : 2, lwd = 2, xpd = TRUE)
# \donttest{
# Daylength at latitude 75N in the year 2000, according to the two different radiation models
DL_hr <- matrix(nrow = 2, ncol = 366, dimnames = list(c("Solar123", "SPLASH"), seq(1, 366)))
DL_hr[1, ] <- cliAvgDlySolIrrPoints(75., 0., daily = TRUE, mlyOpVar = "DL")$dly$DL_hr
DL_hr[2, ] <- cliAvgDlySolIrrPoints(75., 0., aprchSIM = "SPLASH", daily = TRUE,
mlyOpVar = "DL")$dly$DL_hr
cols <- c("black", "green")
matplot(t(DL_hr), type = "l", lwd = 2, col = cols, xaxt = "n", xlab = "Day number in the year",
ylab = "Daylength (hr)")
axis(1, at = seq(1, ncol(DL_hr)), labels = colnames(DL_hr))
legend(1, 20, legend = rownames(DL_hr), col = cols, lty = 1 : 2, lwd = 2, xpd = TRUE)
# }
Run the code above in your browser using DataLab