SolarArbiter / solarforecastarbiter-core

Core data gathering, validation, processing, and reporting package for the Solar Forecast Arbiter
https://solarforecastarbiter-core.readthedocs.io
MIT License
33 stars 21 forks source link

implement shading flag #672

Open wholmgren opened 3 years ago

wholmgren commented 3 years ago

I don't know how you do it, but it would be good to flag data like this:

Screen Shot 2021-04-21 at 1 49 01 PM

Screen Shot 2021-04-21 at 2 19 12 PM

This occurs throughout the Cocoa RTC data.

@cwhanse @wfvining you might be interested in this for pvanalytics.

cwhanse commented 3 years ago

That sure looks like horizon shading to me.

wholmgren commented 3 years ago

I wasn't sure if I should blame it on an obstruction or on the instrument, but yes, maybe it would be more appropriate to change this issue to something like "implement horizon shading detection algorithm". We do have an unimplemented SHADED flag waiting for something like this.

Maybe test https://github.com/pvlib/pvanalytics/pull/101 against this data? If you don't already have easy access within Sandia, you can download it from https://dashboard.solarforecastarbiter.org/observations/063d42da-99fe-11e9-8674-0a580a8200c9

wholmgren commented 3 years ago

Added the DNI to the original post so it would be roughly in alignment with the GHI screenshot. DNI is 0 during the suspected morning horizon shading, but it also has an odd behavior for the following ~hour. The afternoon behavior is not as pronounced. It's also not consistent. Here's another sample:

Screen Shot 2021-04-21 at 2 24 10 PM

Any hope of using https://github.com/pvlib/pvanalytics/pull/101 with DNI?

cwhanse commented 3 years ago

The shading algorithm operates on windows spanning consecutive days (I think something like 2 weeks), so it will need a month or more data to have a chance of labeling times with shading. Conceptually, the detection technique should work on DNI, but we'd might need to adjust its internal normalization.

If it works, the labeling will mask shadows around sunrise/sunset, where DNI differs substantially from a clear-sky model, as well as any shadows that recur at about the same over consecutive days. I don't see any evidence for the latter. Would a mask that identifies the morning/evening boundary in this figure help? x-axis is time of day (data have timestamps of UTC and I didn't correct to local time)), y-axis is day of year. Color is DNI as a fraction of max(DNI) over the year.

cocoa_fl_dni_2020-01-01_2021_01_01

wholmgren commented 3 years ago

Would a mask that identifies the morning/evening boundary in this figure help?

Yes. Also that might make a good example in pvlib example gallery. I've wanted to add this kind of plot to the Arbiter but ran out of time/money.