Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ docs/examples/*.tar
docs/examples/*.zip
docs/examples/*.grib
docs/examples/_*
docs/tutorials/*.tar
docs/tutorials/*.zip
docs/tutorials/*.grib
docs/tutorials/_*


# PyBuilder
target/
Expand Down
20 changes: 15 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
else:
source_branch = "main"

src_path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "src"))
src_path = os.path.normpath(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "src")
)
sys.path.insert(0, src_path)

# Adds path to the folder _ext, where extensions are stored
Expand Down Expand Up @@ -126,11 +128,19 @@
# clean_autodocs.py feature flags
# Set to False/None to disable or soften the corresponding processing step.
autodocs_delete_hidden = True # delete RST files for private/hidden modules
autodocs_replace_automodule = True # replace automodule directives with autosummary tables
autodocs_short_display_names = True # shorten toctree labels to the last module component
autodocs_top_level_maxdepth = 1 # :maxdepth: on top-level page (None = keep sphinx-apidoc value)
autodocs_replace_automodule = (
True # replace automodule directives with autosummary tables
)
autodocs_short_display_names = (
True # shorten toctree labels to the last module component
)
autodocs_top_level_maxdepth = (
1 # :maxdepth: on top-level page (None = keep sphinx-apidoc value)
)
autodocs_rename_titles = False # strip " package"/" module" from RST page headings
autodocs_top_level_title = "API Reference" # top-level page heading (used when rename_titles=True)
autodocs_top_level_title = (
"API Reference" # top-level page heading (used when rename_titles=True)
)
autodocs_titlesonly = False # inject :titlesonly: into toctree directives

# List of patterns, relative to source directory, that match files and
Expand Down
56 changes: 42 additions & 14 deletions docs/tutorials/comparing-models-solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "99b8444d",
"metadata": {},
"source": [
"## Data from different sources\n",
"# Data from different sources\n",
"\n",
"In this notebook, we will compare global temperature anomalies from two datasets:\n",
"- [ERA5 reanalysis](https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels-monthly-means?tab=download) from **ECMWF**, available through the Climate Data Store.\n",
Expand Down Expand Up @@ -96,7 +96,8 @@
],
"source": [
"era5_reference_data = ekd.from_source(\n",
" \"cds\", \"reanalysis-era5-single-levels-monthly-means\",\n",
" \"cds\",\n",
" \"reanalysis-era5-single-levels-monthly-means\",\n",
" {\n",
" \"product_type\": \"monthly_averaged_reanalysis\",\n",
" \"variable\": \"2m_temperature\",\n",
Expand All @@ -107,7 +108,8 @@
")\n",
"\n",
"era5_2024_data = ekd.from_source(\n",
" \"cds\", \"reanalysis-era5-single-levels-monthly-means\",\n",
" \"cds\",\n",
" \"reanalysis-era5-single-levels-monthly-means\",\n",
" {\n",
" \"product_type\": \"monthly_averaged_reanalysis\",\n",
" \"variable\": \"2m_temperature\",\n",
Expand Down Expand Up @@ -1799,10 +1801,28 @@
"source": [
"style = ekp.styles.Contour(\n",
" colors=[\n",
" \"#1B2C62\", \"#1F4182\", \"#2355A1\", \"#3978BB\", \"#519BD2\", \"#71B8E4\",\n",
" \"#91D1F2\", \"#B0E1F8\", \"#CBEBF9\", \"#E3F4FB\", \"#F5FBFE\", \"#FEFBEA\",\n",
" \"#FDF2BC\", \"#FCE18A\", \"#FDC659\", \"#FDA731\", \"#F9872D\", \"#F26429\",\n",
" \"#E34128\", \"#D01F27\", \"#B31A21\", \"#921519\",\n",
" \"#1B2C62\",\n",
" \"#1F4182\",\n",
" \"#2355A1\",\n",
" \"#3978BB\",\n",
" \"#519BD2\",\n",
" \"#71B8E4\",\n",
" \"#91D1F2\",\n",
" \"#B0E1F8\",\n",
" \"#CBEBF9\",\n",
" \"#E3F4FB\",\n",
" \"#F5FBFE\",\n",
" \"#FEFBEA\",\n",
" \"#FDF2BC\",\n",
" \"#FCE18A\",\n",
" \"#FDC659\",\n",
" \"#FDA731\",\n",
" \"#F9872D\",\n",
" \"#F26429\",\n",
" \"#E34128\",\n",
" \"#D01F27\",\n",
" \"#B31A21\",\n",
" \"#921519\",\n",
" ],\n",
" levels=range(-7, 8),\n",
" ticks=range(-7, 8),\n",
Expand Down Expand Up @@ -1879,7 +1899,9 @@
"# We can directly access the underlying matplotlib objects to do this\n",
"x = [-180, -180, 180, 180, -180]\n",
"y = [-90, 90, 90, -90, -90]\n",
"figure[0].ax.fill(x, y, transform=ccrs.PlateCarree(), hatch=\"///////\", fill=False, zorder=0)\n",
"figure[0].ax.fill(\n",
" x, y, transform=ccrs.PlateCarree(), hatch=\"///////\", fill=False, zorder=0\n",
")\n",
"\n",
"figure.show()"
]
Expand Down Expand Up @@ -1917,7 +1939,8 @@
],
"source": [
"era5_reference_data = ekd.from_source(\n",
" \"cds\", \"reanalysis-era5-single-levels-monthly-means\",\n",
" \"cds\",\n",
" \"reanalysis-era5-single-levels-monthly-means\",\n",
" {\n",
" \"product_type\": \"monthly_averaged_reanalysis\",\n",
" \"variable\": \"2m_temperature\",\n",
Expand All @@ -1928,7 +1951,8 @@
")\n",
"\n",
"era5_2025_data = ekd.from_source(\n",
" \"cds\", \"reanalysis-era5-single-levels-monthly-means\",\n",
" \"cds\",\n",
" \"reanalysis-era5-single-levels-monthly-means\",\n",
" {\n",
" \"product_type\": \"monthly_averaged_reanalysis\",\n",
" \"variable\": \"2m_temperature\",\n",
Expand Down Expand Up @@ -2042,7 +2066,9 @@
"# We can directly access the underlying matplotlib objects to do this\n",
"x = [-180, -180, 180, 180, -180]\n",
"y = [-90, 90, 90, -90, -90]\n",
"figure[0].ax.fill(x, y, transform=ccrs.PlateCarree(), hatch=\"///////\", fill=False, zorder=0)\n",
"figure[0].ax.fill(\n",
" x, y, transform=ccrs.PlateCarree(), hatch=\"///////\", fill=False, zorder=0\n",
")\n",
"\n",
"figure.show()"
]
Expand Down Expand Up @@ -2112,15 +2138,17 @@
"# We can directly access the underlying matplotlib objects to do this\n",
"x = [-180, -180, 180, 180, -180]\n",
"y = [-90, 90, 90, -90, -90]\n",
"figure[0].ax.fill(x, y, transform=ccrs.PlateCarree(), hatch=\"///////\", fill=False, zorder=0)\n",
"figure[0].ax.fill(\n",
" x, y, transform=ccrs.PlateCarree(), hatch=\"///////\", fill=False, zorder=0\n",
")\n",
"\n",
"figure.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ek",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -2134,7 +2162,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.18"
"version": "3.13.1"
}
},
"nbformat": 4,
Expand Down
Loading
Loading