-
Notifications
You must be signed in to change notification settings - Fork 53
Description
From Slack I wrote:
Okay, I now remember what was going on. Basically, we compute the time of sunrise and sunset for each day, and use a simple linear fit on vapor pressure to disaggregate. Now the problem occurs on the first timestep specifically because this has time periods before the first sunrise (generally). Then, when we do this linear fit, we just extrapolate back in time. Occasionally this can put you in a position of negative relative humidity, which would cause NaNs to get produced by longwave and humidity. So, to alleviate this we just backfilled as constant instead of linearly interpolating backwards.
However, the backfilling I implemented happens after all of the other caluclations. Instead we should backfill vapor pressure before calculating longwave, humidity, etc.