1

I am trying to calculate the radiation on a tilt surface based on the radiation of a horizontal surface. I found another question solaR timestamp for radiation on a tilted surface but unfortunately, it didn't help me. Here is my try (with some fake data):

library("solaR")

# example how the G0 data (radiation on horizontal surface) should look like
G0 = c(  0,   0,   0,   0,   0,  0,   2,  78, 152, 182, 239, 547, 624, 383, 312, 273, 241, 195, 145,  90,  29,   0,   0,   0)
B0 = c(0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  1.6, 62.4,121.6,145.6,191.2,437.6,499.2,306.4,249.6,218.4,192.8,156.0,116.0, 72.0, 23.2,  0.0,  0.0,  0.0)
D0 = G0-B0
Ta = c(4.4,3.2,2.8,2.7,2.6,2.4,2.6,2.6,2.6,2.7,3.7,4.4,4.8,5.8,6.3,6.7,6.8,6.9,6.7,6.7,6.4,4.8,3.2,1.2);
timestamp = seq(from = as.POSIXct("2016-04-21 00:00", tz="UTC"), to = as.POSIXct("2016-04-22 23:00", tz="UTC"), by = "hour")
df = data.frame(timestamp = as.character(timestamp), G0=rep(G0,2), B0=rep(B0,2), D0=rep(D0,2), Ta=rep(Ta,2))

bdi = dfI2Meteo(df, time.col = 'timestamp', lat=42, source='', format='%Y-%m-%d %H:%M:%S')
summary(getData(bdi))
xyplot(bdi)

# transform it to effective irradiation

gef = calcGef(42,
    modeTrk='fixed',
    modeRad='bdI',
    bdi,
    keep.night=TRUE,
    sunGeometry='michalsky',
    beta=30, alfa=0,
    iS=2, 
    alb=0.2
    )

xyplot(gef)

The result only shows daily average values, but I would like to get hourly values. What am I missing?

Community
  • 1
  • 1
MichaMuc
  • 29
  • 6

1 Answers1

0

Ok, i found the soultion myself, just a stupid thing, the last line should be

xyplot(as.zooI(gef))

instead of

xyplot(gef)
MichaMuc
  • 29
  • 6