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

Weather forecast on dashboard #185

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

ADIMANV
Copy link
Contributor

@ADIMANV ADIMANV commented Aug 23, 2024

Pull Request

Description

This code will be an addition, to the dashboard and will show weather forecast/ historical data.
This data pulled will be from ECMWF with the help of herbie.
This PR is With india coordinates, will need to make changes if UK needs to be added.

The following is the snap of the webpage:
image

How Has This Been Tested?

Several tests were ran to see the data being pulled is correct or not

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

  • [ x] Yes

Checklist:

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

@peterdudfield
Copy link
Contributor

Could you add a screen shot of the UI in the PR?

@peterdudfield
Copy link
Contributor

You should import the page and add it here

@peterdudfield
Copy link
Contributor

You need to add herbie to the requirements too

@peterdudfield
Copy link
Contributor

We discuss int he call today,

  • getting rid of end date, so just have one day
  • having extra drop down menu that gives the initial time of the forecast E.g for date=2024-80-28, the options could be 2024-08-27 00:00:00, 2024-08-27 00:06:00, 2024-08-27 00:12:00, , 2024-08-27 00:18:00, , 2024-08-28 00:00:00, 2024-08-28 00:06:00, 2024-08-28 00:12:00, 2024-08-28 00:18:00,
  • adding note to say that the data takes about ~30 seconds to download
  • wrapping this page liek the others, so it can be selected as a subpage

@peterdudfield
Copy link
Contributor

To help the inital speed up, shold you default to just one init time, perhaps at 00:00

* main:
  fiona==1.9.6
  tidy up user page
  fix india nwp and satellite paths
  Update README.md
  fix defaults
  local case regions
  add nwp and satellite keys only show user input when needed
  fix typo
  add REGION and ENVIROMENT add default options for india and uk for nwp and satellite only select sites on india api users page
  fix for elexon plot
@peterdudfield
Copy link
Contributor

Could your rename the file Weather_Forecast_on_dashbaord.py to weather_forecast

Copy link
Contributor

@peterdudfield peterdudfield left a comment

Choose a reason for hiding this comment

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

Could you add function docs and explain what the parameters are

@peterdudfield
Copy link
Contributor

Could you add function docs and explain what the parameters are

Good example is here - https://github.com/openclimatefix/pv-site-datamodel/blob/main/pvsite_datamodel/read/generation.py#L76

- init_time (datetime or None): The initialization time for the dataset.
"""
# Adjust the initialization datetime
FH = FastHerbie([init_time], model=model, fxx=range(init_time.hour, 24 + init_time.hour, 1), fast=True)
Copy link
Contributor

@peterdudfield peterdudfield Sep 5, 2024

Choose a reason for hiding this comment

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

shouldnt this be (forecast_date - init_time).hours or something like that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i have already set up the init times to be forecast day-1. So to give init times of yesterday for the forecast of today.

Copy link
Contributor

Choose a reason for hiding this comment

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

yea but if you say forecast is today, and init time is 06:00 yesterday. fxx = range(6,30) which willget times from 12:00 yesterday to 12:00 today, so not the whole of today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants