Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Conversation

@peterdudfield
Copy link
Contributor

@peterdudfield peterdudfield commented Nov 16, 2021

Pull Request

Description

  • fix for nwp - load hour floor data
  • fix for pv
  • fix for sun and topographic : return xr.Dataset
  • added test for Manager to initialise data sources and make batches

Fixes #

How Has This Been Tested?

unitest tests

  • added one for nwp - load data not on hour

  • added one for manger too - initialise data source and get batches

  • No

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@peterdudfield peterdudfield changed the title Bug/manger sun Bug/manager pv nwp Nov 16, 2021
@peterdudfield peterdudfield self-assigned this Nov 16, 2021
@peterdudfield peterdudfield changed the title Bug/manager pv nwp Bug/manager Nov 16, 2021
@peterdudfield peterdudfield marked this pull request as ready for review November 16, 2021 17:01
@peterdudfield
Copy link
Contributor Author

I will resolve this conflicts

# Conflicts:
#	nowcasting_dataset/data_sources/nwp/nwp_data_source.py
Copy link
Contributor

@JackKelly JackKelly left a comment

Choose a reason for hiding this comment

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

Awesome work! LGTM!

# if t0_dt is not on the hour, e.g. 13.05.
# Then if the history_minutes is 1 hours,
# so start_dt will be 12.05, but we want to the 12.00 time step too
start_dt = start_dt.floor("H")
Copy link
Contributor

Choose a reason for hiding this comment

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

Very good catch; and very elegant fix! Nice!

(And perfect timing too, because I think I just bumped into the same bug: #410 🙂 )

@peterdudfield peterdudfield merged commit 9139749 into main Nov 16, 2021
@peterdudfield peterdudfield deleted the bug/manger-sun branch November 16, 2021 21:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants