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.

Notebook examples

K-means clustering analysis of oceanographic patterns in the Mediterranean Sea

Sept-2025-Venice-Edinburgh-Leeds.jpg

Note
This notebook has been developed and validated on the DeepESDL environment, where the necessary data, tools, and execution kernels are available. DeepESDL is part of ESA’s EarthCODE initiative, enabling open and reproducible Earth Science. Sponsored access can be requested through ESA’s Network of Resources.

Title

Challenge: K-means clustering analysis of oceanographic patterns in the Mediterranean Sea

Authors:

  • Katie Lowery, British Antarctic Survey (BAS), Cambridge, United Kingdom of Great Britain

  • William Luty , University of Leeds, Leeds, United Kingdom of Great Britain - England, Scotland, Wales

  • Enrico Biscaro, Ca’ Foscari University of Venice, Italy

Back to Table of Contents

Description

Scientific problem

Ocean water types - such as coastal, upwelling, oligotrophic, and eutrophic waters - exhibit distinct spectral and biogeochemical characteristics. Classifying these types is essential for understanding marine ecosystems, monitoring water quality, and supporting climate and fisheries research. This challenge leverages EO data and unsupervised learning to classify ocean water types based on spectral reflectance and derived indices.

Objective

Use clustering algorithms to classify ocean water types from EO spectral bands and indices. Validate clusters against known oceanographic features or water classifications and produce a map of water types for a selected region.

Method

K-means clustering.

Clustering optimization technique

  • Elbow method: to determine the optimal number of clusters to use.

  • Optimization metric: Inertia (Sum of Squared Errors)

Service used

Copernicus Marine Service.

Use case: Mediterranean Sea

  • Optimizing fish harvesting while preserving fish populations and marine biodiversity in the Mediterranean

  • Monitoring physico-chemical parameters of the Mediterranean Sea in a climate change scenario also considering its contribution to the Atlantic Meridional Overturning Circulation (AMOC)

Clustering_use-case.JPG

Processing workflow

kmeans-clustering_cmems.JPG

Back to Table of Contents

References

  • Berthon, J.-F., Zibordi, G.: Bio-optical relationships for the northern Adriatic Sea. Int. J. Remote Sens., 25, 1527-1532, 2004

  • Buongiorno Nardelli, B., R. Droghei, and R. Santoleri, (2016): Multi-dimensional interpolation of SMOS sea surface salinity with surface temperature and in situ salinity data. Rem. Sens. Environ

  • Droghei, R., B. Buongiorno Nardelli, and R. Santoleri, 2016: Combining in-situ and satellite observations to retrieve salinity and density at the ocean surface. J. Atmos. Oceanic Technol.

  • Embury, O., Merchant, C.J., Good, S.A., Rayner, N.A., Høyer, J.L., Atkinson, C., Block, T., Alerskans, E., Pearson, K.J., Worsfold, M., McCarroll, N., Donlon, C., (2024). Satellite-based time-series of sea-surface temperature since 1980 for climate applications. Sci Data 11, 326

  • Pisano, A., Nardelli, B. B., Tronconi, C., & Santoleri, R. (2016). The new Mediterranean optimally interpolated pathfinder AVHRR SST Dataset (1982–2012). Remote Sensing of Environment, 176, 107-116

  • Sammartino, Michela, Salvatore Aronica, Rosalia Santoleri, and Bruno Buongiorno Nardelli. (2022). Retrieving Mediterranean Sea Surface Salinity Distribution and Interannual Trends from Multi-Sensor Satellite and In Situ Data, Remote Sensing 14, 250

  • Volpe, G., Buongiorno Nardelli, B., Colella, S., Pisano, A. and Santoleri, R. (2018). An Operational Interpolated Ocean Colour Product in the Mediterranean Sea, in New Frontiers in Operational Oceanography, edited by E. P. Chassignet, A. Pascual, J. Tintorè, and J. Verron, pp. 227–244z

  • Volpe, G., Colella, S., Brando, V. E., Forneris, V., Padula, F. L., Cicco, A. D., ... & Santoleri, R. (2019). Mediterranean ocean colour Level 3 operational multi-sensor processing. Ocean Science, 15(1), 127-146

Back to Table of Contents

Key Conclusions

This study demonstrates the effectiveness of unsupervised clustering for identifying and mapping ocean water types from multi-parameter satellite observations. Key findings include:

  1. Three distinct water types identified: Coastal (high productivity), eutrophic (moderate productivity), and oligotrophic (low productivity) waters distinguished by combined biological, physical, and atmospheric characteristics

  2. Geographic coherence: Spatial patterns align with known Mediterranean oceanography, validating the clustering approach against established understanding

  3. Seasonal dynamics captured: Temporal analysis reveals expansion/contraction of water types consistent with seasonal stratification and mixing cycles

  4. Multi-parameter synergy: Integration of chlorophyll-a, SST, sea level height, and wind components provides richer characterization than single-parameter approaches

Study limitations and future directions:

  • Cluster number selection: Statistical optimum (5 clusters) provided insufficient detail, while chosen number (8) resulted in only 3 active clusters—suggesting need for adaptive cluster selection methods

  • Coastal water stability: Lack of seasonal variation in Cluster 2 (coastal waters) may indicate need for higher temporal resolution or separate coastal-specific analysis

  • Validation needed: No quantitative validation against in-situ measurements or existing water type classifications was performed

  • Algorithm exploration: Testing alternative clustering methods (hierarchical, DBSCAN, Gaussian mixture models) could improve classification

  • Additional parameters: Including sea surface salinity, turbidity, or fluorescence line height could enhance water type discrimination

Future work priorities:

  • Extend analysis to other ocean basins for method generalization

  • Incorporate in-situ validation data from research cruises and Argo floats

  • Develop operational products for near-real-time water type mapping

  • Investigate machine learning approaches for temporal prediction of water type transitions

The framework established here provides a foundation for automated ocean water type classification from Earth observation data, with potential applications in operational oceanography, ecosystem monitoring, and climate change impact assessment.

Back to Table of Contents

Societal Context

  • Understanding marine ecosystems

  • Monitoring water quality

  • Supporting climate and fisheries research by mapping productive zones

Import Libraries

Data sources

The table below shows the data products used with links to description, access source and classification attributes.

Loading...

Copernicus Marine Service data cubes CMEMS products have been accessed via xcube plugin from the CMEMS API.
Further information on the available data sources on DeepESDL with data access example notebooks can be found here.

Back to Table of Contents

Combining input data

Loading and combining CMEMS oceanographic datasets

INFO - 2025-11-13T21:53:44Z - Selected dataset version: "202311"
INFO - 2025-11-13T21:53:44Z - Selected dataset part: "default"
WARNING - 2025-11-13T21:53:45Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.005064010620117, 45.994937896728516]
WARNING - 2025-11-13T21:53:45Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-5.9935760498046875, 36.49357604980469]
WARNING - 2025-11-13T21:53:45Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.005064010620117, 45.994937896728516]
WARNING - 2025-11-13T21:53:45Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-5.9935760498046875, 36.49357604980469]
INFO - 2025-11-13T21:53:46Z - Selected dataset version: "202311"
INFO - 2025-11-13T21:53:46Z - Selected dataset part: "default"
INFO - 2025-11-13T21:53:47Z - Selected dataset version: "202411"
INFO - 2025-11-13T21:53:47Z - Selected dataset part: "default"
INFO - 2025-11-13T21:53:48Z - Selected dataset version: "202411"
INFO - 2025-11-13T21:53:48Z - Selected dataset part: "default"
WARNING - 2025-11-13T21:53:48Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.125, 46.025001525878906]
WARNING - 2025-11-13T21:53:48Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-18.125, 36.32500076293945]
WARNING - 2025-11-13T21:53:48Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.125, 46.025001525878906]
WARNING - 2025-11-13T21:53:48Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-18.125, 36.32500076293945]
INFO - 2025-11-13T21:53:50Z - Selected dataset version: "202411"
INFO - 2025-11-13T21:53:50Z - Selected dataset part: "default"

Visualizing input data

Visualizing oceanographic input variables

Chlorophyll-a concentrations

<Figure size 1500x800 with 4 Axes>

Sea Surface Height (SSH)

<Figure size 1500x800 with 4 Axes>

Sea Surface Temperature (SST)

<Figure size 1500x800 with 4 Axes>

Eastward Wind component

<Figure size 1500x800 with 4 Axes>

Northward Wind component

<Figure size 1500x800 with 4 Axes>

Analysis

Utility functions

Normalizing input variables

Extracting and normalizing monthly oceanographic variable

Averaging and normalizing oceanographic variable

Finding the optimal number of clusters (optimization technique: Elbow Method)

Converting cluster assignments to Geo-DataArray

Processing seasonal climatology variables by month

Converting Geo-DataArray to csv

K-means implementation

Finding the optimal number of clusters

/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
<Figure size 640x480 with 1 Axes>

By looking at the graph, the Elbow point is at 5. However, 8 has been chosen since 5, 6 and 7 clusters led to only two water types (coastal and open).

['labels.joblib']

Monthly clustering

Extracting monthly variables from the combined dataset

/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count

Applying K-means clustering to monthly variables

Visualization of monthly clusters

<Figure size 1500x1700 with 4 Axes>
<Figure size 1500x600 with 2 Axes>

Seasonal clustering

Extracting seasonal variables from the combined dataset

INFO - 2025-11-11T14:49:33Z - Selected dataset version: "202311"
INFO - 2025-11-11T14:49:33Z - Selected dataset part: "default"
WARNING - 2025-11-11T14:49:34Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.005064010620117, 45.994937896728516]
WARNING - 2025-11-11T14:49:34Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-5.9935760498046875, 36.49357604980469]
WARNING - 2025-11-11T14:49:34Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.005064010620117, 45.994937896728516]
WARNING - 2025-11-11T14:49:34Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-5.9935760498046875, 36.49357604980469]
INFO - 2025-11-11T14:49:35Z - Selected dataset version: "202311"
INFO - 2025-11-11T14:49:35Z - Selected dataset part: "default"
INFO - 2025-11-11T14:49:36Z - Selected dataset version: "202411"
INFO - 2025-11-11T14:49:36Z - Selected dataset part: "default"
INFO - 2025-11-11T14:49:37Z - Selected dataset version: "202411"
INFO - 2025-11-11T14:49:37Z - Selected dataset part: "default"
WARNING - 2025-11-11T14:49:37Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.125, 46.025001525878906]
WARNING - 2025-11-11T14:49:37Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-18.125, 36.32500076293945]
WARNING - 2025-11-11T14:49:37Z - Some of your subset selection [30, 46] for the latitude dimension exceed the dataset coordinates [30.125, 46.025001525878906]
WARNING - 2025-11-11T14:49:37Z - Some of your subset selection [-6.0, 36.5] for the longitude dimension exceed the dataset coordinates [-18.125, 36.32500076293945]
INFO - 2025-11-11T14:49:38Z - Selected dataset version: "202411"
INFO - 2025-11-11T14:49:38Z - Selected dataset part: "default"
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1144: RuntimeWarning: invalid value encountered in divide
  updated_mean = (last_sum + new_sum) / updated_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1149: RuntimeWarning: invalid value encountered in divide
  T = new_sum / new_sample_count
/home/conda/users/03ab8823-1758107623-131-deepesdl-xcube-1.11.0/lib/python3.13/site-packages/sklearn/utils/extmath.py:1169: RuntimeWarning: invalid value encountered in divide
  new_unnormalized_variance -= correction**2 / new_sample_count

Applying K-means clustering to seasonal variables

Visualization of seasonal clusters

<Figure size 1500x1700 with 4 Axes>
<Figure size 1500x1700 with 4 Axes>
  • Cluster 1 (violet) - Eutrophic Water: - Colder waters - Eastward Winds - Medium Chlorophyll-a content

  • Cluster 2 (orange) - Coastal Water: - Very high Chlorophyll-a - Sea Surface Height

  • Cluster 7 (grey) - Oligotrophic Water: - Warmer waters - Northward wind and wind stress - Low Chlorophyll-a Conten

Percentage change of seasonal clusters

<Figure size 1200x400 with 1 Axes>