Models
Get model outputs
Download a model’s output time series at a reference time
To get a model’s output/forecast time series at reference time, use the following python code:
import requests
import pandas as pd
model_id = 'Put the model ID here'
url = f'https://api.rebase.energy/platform/v2/models/{model_id}/output'
ref_time = pd.to_datetime('2024-06-28T00:00').strftime('%Y-%m-%d %H:%M')
tz = 'UTC'
params={
'ref_time': ref_time,
'tz': tz
}
response = requests.get(url=url, headers=headers, params=params)
response.raise_for_status()
response = response.json()
Response example
{
"forecast": [
0.0,
0.0,
0.0,
0.0
],
"model_id": "0c456ecb-d245-4569-bc8e-4e67a566dcd72",
"model_label": "Solar_MetOfficeGlobalHiRes_Physical-v1",
"model_name": "Solar_MetOfficeGlobalHiRes_Physical",
"model_version": 1,
"priority": 5,
"ref_time": "2024-06-28T00:00:00+0000",
"valid_time": [
"2024-06-28T00:00:00+0000",
"2024-06-28T00:15:00+0000",
"2024-06-28T00:30:00+0000",
"2024-06-28T00:45:00+0000",
"2024-06-28T01:00:00+0000"
]
}