Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add day night #127

Merged
merged 18 commits into from
Dec 6, 2023
Merged

Feature/add day night #127

merged 18 commits into from
Dec 6, 2023

Conversation

paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Sep 28, 2023

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

@paulf81 paulf81 added the enhancement An improvement of an existing feature label Sep 28, 2023
@paulf81 paulf81 self-assigned this Sep 28, 2023
@Bartdoekemeijer
Copy link
Collaborator

Nice feature!

Copy link
Collaborator

@misi9170 misi9170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulf81 I've made a couple of changes, but I think this is good to go. I did add a note to the example notebook indicating that the apparent choice of 0 for the daytime deflection parameter is something we are thinking about, and I've opened a discussion for this here: #142

@paulf81
Copy link
Collaborator Author

paulf81 commented Dec 6, 2023

Thanks you @misi9170 ! Merging now...

@paulf81 paulf81 merged commit eaf6147 into NREL:develop Dec 6, 2023
3 checks passed
@paulf81 paulf81 deleted the feature/add_day_night branch December 6, 2023 19:53
@misi9170 misi9170 mentioned this pull request Dec 21, 2023
@misi9170 misi9170 mentioned this pull request Apr 10, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants