openclimatefix / nowcasting_datamodel

Datamodel for the nowcasting project
6 stars 6 forks source link

Make random numbers #122

Closed peterdudfield closed 2 years ago

peterdudfield commented 2 years ago

Make random number sin fake data to reflect sun

Detailed Description

Context

Make fake data a bit more real

Possible Implementation

some in here and here

Probably good to do something like this

fraction_of_day = (target_time.hour*60 + target_time.minute) / (24*60)
total_minutes_in_day = 24*60
# use double cos wave for intenisty, but set night time to zero
if fraction_of_day > 0.25 & fraction_of_day < 0.75:
    intenisty = cos(2 * 2*pi*fraction_of_day)
else:
   intenisty = 0
power = capacity * ( intenisty)

Always nice to do a different function (+ a small test), and then use that function in the two locations

peterdudfield commented 2 years ago

Maybe we add 5% noise, so that not all the values are the same. We could add postive noise so we never get negative vlaues, or a factor