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

API forecast/all forecast_horizon #175

Open
peterdudfield opened this issue Feb 1, 2023 · 0 comments
Open

API forecast/all forecast_horizon #175

peterdudfield opened this issue Feb 1, 2023 · 0 comments
Assignees

Comments

@peterdudfield
Copy link
Collaborator

peterdudfield commented Feb 1, 2023

Allow forecast/all route to get 4 hour view.

Add two new variables to v0/solar/GB/gsp/forecast/all/

  • forecast_horizon_minutes
  • only_forecast_values

/forecast/all uses /src/database.py - get_forecasts_from_database function

if only_forecast_values then we can uses


    forecast_values = get_forecast_values(
        session=session,
        gsp_id=range(0,N_GSPS),
        start_datetime=start_datetime,
        only_return_latest=True,
        forecast_horizon_minutes=forecast_horizon_minutes,
        model=ForecastValueSevenDaysSQL,
    )

This should be in historic==False section.

TODO

Need to think how this object should be returned. It cant just be a list of ForecastValues as that doesnt include the location (gsp_id).

openclimatefix/nowcasting_datamodel#144

It could be made into a list of Forecasts but this might require a bit of manipulating, so there is only one Forecast for each gsp_id. We could do this in the datamodel, so that the api deosnt need to worry about it

Data model:

datamodel has been adapted here - openclimatefix/nowcasting_datamodel#143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants