Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Access MITHO

ESA
* Original Data Source: https://zenodo.org/records/17191460
* Reference:  https://opensciencedata.esa.int/products/global-cumulative-hazard-indexes-chis/collection.json
* OSC entry: https://opensciencedata.esa.int/products/global-cumulative-hazard-indexes-chis/collection.json
* License: CC-BY-4.0
zarr_href1 = 'https://s3.waw4-1.cloudferro.com/EarthCODE/OSCAssets/ocean_datasets/ch13.zarr/'
zarr_href2 = 'https://s3.waw4-1.cloudferro.com/EarthCODE/OSCAssets/ocean_datasets/chi2_2004_2022.zarr/'
zarr_href3 = 'https://s3.waw4-1.cloudferro.com/EarthCODE/OSCAssets/ocean_datasets/chi4_2012_2020.zarr/'

zarr_href1 = '/run/media/krasen/Storage/ocean/processed/mitho/ch13.zarr/'
zarr_href2 = '/run/media/krasen/Storage/ocean/processed/mitho/chi2_2004_2022.zarr/'
zarr_href3 = '/run/media/krasen/Storage/ocean/processed/mitho/chi4_2012_2020.zarr/'
import xarray as xr
ds = xr.open_zarr(zarr_href1)
ds
Loading...
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import numpy as np

# Choose date
date = "2020-06"

# Select FSLE for that date
pp = ds["CH1_CHI1"].sel(time=np.datetime64(date), longitude=slice(-6.062, 36.06), latitude=slice(30.27, 45.98), drop=True)

# 2-D coordinates
lon = pp["longitude"]
lat = pp["latitude"]

# Create map
fig = plt.figure(figsize=(12, 7))

ax = plt.axes(projection=ccrs.PlateCarree())

# Plot FSLE
pcm = ax.pcolormesh(
    lon,
    lat,
    pp,
    transform=ccrs.PlateCarree(),
    shading="auto",
    cmap="viridis"
)

# Basemap features
ax.add_feature(cfeature.LAND, facecolor="lightgray")
ax.add_feature(cfeature.COASTLINE, linewidth=0.8)
ax.add_feature(cfeature.BORDERS, linewidth=0.5)


# Colourbar
cbar = plt.colorbar(
    pcm,
    ax=ax,
    orientation="vertical",
    pad=0.03,
    shrink=0.8
)
cbar.set_label("CHI1 Index")

ax.set_title(f"CHI1 = S_MHW + S_CS + S_PH — {date}")

plt.tight_layout()
plt.show()
<Figure size 1200x700 with 2 Axes>