Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

✨ Add PV yield prediction via predict_pv_yield_nwp #34

Merged
merged 3 commits into from
Jun 17, 2020

Conversation

tomwhite
Copy link
Member

@tomwhite tomwhite commented Jun 4, 2020

This is not yet ready for merge, but it shows the idea behind #33. It still needs changing to use UKV irradiance data.

cc @JackKelly @fwirtz

Fixes #33

@tomwhite
Copy link
Member Author

tomwhite commented Jun 6, 2020

Updated to get irradiance data from a Met Office UKV netcdf file. This should be easy to change to read from a Zarr store.

The output is JSON that looks like this:

[
    {
        "system_id":973,
        "easting":445587,
        "northing":497235,
        "time":1591290000000,
        "pv_yield_predicted":507.5
    },
    {
        "system_id":1364,
        "easting":431430,
        "northing":272536,
        "time":1591290000000,
        "pv_yield_predicted":214.8
    },
...
]

@flowirtz
Copy link
Contributor

Awesome, thanks @tomwhite!

Just for my (very limited) understanding: Did you use the PV data from GCP to train the model once, and now for the inference bit we only rely on the NWP Metoffice data? Until we retrain, I suppose.

The output already looks usable, thanks. I'd prefer to use lat/long over easting/northing though, to future proof a bit for expanding to other countries as well. Also, it would be best if the output was GeoJSON.

I think the shape would look something like this then:

{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [-1.299849, 54.368597]
  },
  "properties": {
    "system_id": 973,
    "time": 1591290000000,
    "pv_yield_predicted": 507.5
  }
}

But you can also keep the shape this way, I'd just convert it in the FE then.
Thanks so much!!

@flowirtz flowirtz added this to In progress in Forecasting via automation Jun 11, 2020
@flowirtz flowirtz self-requested a review June 11, 2020 10:41
@tomwhite
Copy link
Member Author

Did you use the PV data from GCP to train the model once, and now for the inference bit we only rely on the NWP Metoffice data? Until we retrain, I suppose.

Yes that's right.

Also, it would be best if the output was GeoJSON.

Great idea! I will try to do that on the next iteration of this PR.

@tomwhite
Copy link
Member Author

I've updated this to produce GeoJSON, e.g.

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -1.299834,
                    54.3686
                ]
            },
            "properties": {
                "system_id": 973,
                "time": "2020-06-04T17:00:00",
                "pv_yield_predicted": 507.5329670623049
            }
        },
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -1.54,
                    52.35
                ]
            },
            "properties": {
                "system_id": 1364,
                "time": "2020-06-04T17:00:00",
                "pv_yield_predicted": 214.8320996361009
            }
        },
...
   ]
}

@tomwhite
Copy link
Member Author

This could be merged now and the change to use irradiance data done in a separate PR, or we could keep this open for that. Happy to do it either way.

Forecasting automation moved this from In progress to Reviewer approved Jun 17, 2020
Copy link
Contributor

@flowirtz flowirtz left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks Tom!

@flowirtz
Copy link
Contributor

Merging now, raised #41 to track the remaining work.

@flowirtz flowirtz changed the title Predict PV yield using the model from predict_pv_yield_nwp ✨ Add PV yield prediction via predict_pv_yield_nwp Jun 17, 2020
@flowirtz flowirtz merged commit fb376f4 into openclimatefix:master Jun 17, 2020
Forecasting automation moved this from Reviewer approved to Done Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Forecasting
  
Done
Development

Successfully merging this pull request may close these issues.

Predict PV yield using baseline NWP model
2 participants