<!--
SPDX-FileCopyrightText: 2025 Mercator Ocean International <https://www.mercator-ocean.eu/>

SPDX-License-Identifier: EUPL-1.2
-->

---
title: "OceanBench"
format:
  html:
    echo: false
    page-layout: full
---

Welcome to OceanBench.


```{python}
# | classes: plain

from IPython.display import display, HTML
from helpers.table import get_html_tables
from helpers.notebook_score_parser import get_model_score_from_notebook, get_model_score_from_file

REFERENCE_SCORE = get_model_score_from_notebook(
    "https://minio.dive.edito.eu/project-oceanbench/public/evaluation-reports/0.0.1a0/glonet.report.ipynb", "GLONET"
)

glonet_sample = get_model_score_from_notebook(
    "https://minio.dive.edito.eu/project-oceanbench/public/evaluation-reports/0.0.1a0/glonet_sample.report.ipynb",
    "GLONET_sample",
)

depths = list(REFERENCE_SCORE.depths.keys())
other_scores = [glonet_sample]


for depth in depths:
    display(HTML(f"<h3>Model scores for {depth} (real value: {REFERENCE_SCORE.depths[depth].real_value})</h3>"))
    display(HTML(get_html_tables(REFERENCE_SCORE, depth, other_scores)))
```
