openclimatefix / nowcasting_datamodel

Datamodel for the nowcasting project
6 stars 6 forks source link

Night time zeros #229

Open peterdudfield opened 1 year ago

peterdudfield commented 1 year ago

From @devsjc and @braddf

A potentially dumb question for eurostar-based mulling: why do we bother saving forecast values for time periods outside of local sunrise and sunset? Can you ever have a predicted solar generation of greater than zero say 2 hours after sunset and 2 hours before sunrise? Might be able to save a lot of redundant rows in our database not bothering to save those - the frontend could just fill in zeros for missing values in that time window, which would mean we could still determine differences between missing and zero values that are occurring not at night (so we wouldn't fall into the trap that came up early on when I started and asked why we save zeros at all!)

Brad: I am not entirely sure, maybe there is a reason for it, or maybe it’s just to keep all the forecasts standard independent from their creation time… but I agree that would save a whole bunch of rows - although I would say we could probably just “fill in” the night numbers on the API side fairly quickly and easily for each set of forecast values, and then the API users and the UI get exactly what they have now

Sol: Yes, perhaps it makes more sense to do the filling in on the API side

peterdudfield commented 1 year ago

The simplest answer is because its simple. Although simple isnt always the best, it does help reduce tech dept and keeps things more readable e.t.c. Simon started with something like this but then started saving night time zeros, in order to keep things simple.

However, we might want to consider this to reduce the total about of data saved.

Some thoughts:

Dont save zeros

Schema change

Dont Load zeros