Closed peterdudfield closed 11 months ago
FROM forecast_value, gsp_yield
WHERE forecast_value.uuid IN (SELECT anon_1.uuid
FROM (SELECT DISTINCT ON (forecast_value.target_time) forecast_value.uuid AS uuid
FROM forecast_value JOIN forecast ON forecast.id = forecast_value.forecast_id
JOIN location ON location.id = forecast.location_id
JOIN model ON model.id = forecast.model_id
WHERE location.gsp_id = 0
AND forecast_value.target_time - forecast_value.created_utc >= interval '450 minute'
-- AND %(created_utc_1)s - forecast_value_last_seven_days.created_utc < interval '450 minute'
AND forecast_value.target_time > '2023-04-06'
AND forecast_value.target_time <= '2023-04-12'
AND model.name = 'National_xg'
ORDER BY forecast_value.target_time, forecast_value.created_utc DESC) AS anon_1) AND gsp_yield.id IN (SELECT anon_2.id
FROM (SELECT gsp_yield.id AS id
FROM gsp_yield JOIN location ON location.id = gsp_yield.location_id
WHERE location.gsp_id = 0
AND gsp_yield.datetime_utc > '2023-04-06'
AND gsp_yield.datetime_utc <= '2023-04-12'
AND gsp_yield.regime = 'day-after') AS anon_2)
AND gsp_yield.datetime_utc = forecast_value.target_time
GROUP BY CAST(gsp_yield.datetime_utc AS TIME WITHOUT TIME ZONE)
Ran this, and found errors from 0 to 800 MW, so I think its worth doing the adjuster
This is now working on dev
All deployed on production now
Detailed Description
It would be good to get the Adjuster working for the National model
Context
Possible Implementation
mode_id
tometric_value
table, so we can have multiple values for different models - https://github.com/openclimatefix/nowcasting_datamodel/pull/167ME
forcnn
andNational_xg
- currenrly only doescnn
- https://github.com/openclimatefix/nowasting_metrics/pull/16This needs