NREL / flasc

A rich floris-driven suite for SCADA analysis
https://nrel.github.io/flasc/
BSD 3-Clause "New" or "Revised" License
31 stars 18 forks source link

Feature/add day night #127

Closed paulf81 closed 9 months ago

paulf81 commented 11 months ago

I think ready to be merged

Feature or improvement description This feature adds a small convenience function that, given the time in a dataframe in UTC and a lat/long coordinate, adds a column to the dataframe is_day that can be used to partition the data into daytime and nighttime. The determination is made using the altitude of the sun calculated via python's ephem package. An option input, lag_hours, allows day/night to start a specified number of hours after sunrise/sunset.

The pull request includes an example using the smarteole data, and a new test.

Impacted areas of the software dataframe_manipulations.py

Bartdoekemeijer commented 11 months ago

Nice feature!

paulf81 commented 9 months ago

Thanks you @misi9170 ! Merging now...