Catalog explorer — browse CMEMS without downloading anything¶
This notebook needs no credentials and no network. It reads the
bundled earthlens.cmems catalog (a directory of per-domain YAML files)
to answer the first questions every CMEMS user has: what's in here, how
is it organised, and what's the dataset id / variable name I need to
pass to download().
The catalog has two tiers, mirroring the GEE and ECMWF backends:
available_datasets— the informational index of every dataset id the Copernicus Marine toolbox publishes (~1,251).datasets— the curated map earthlens models in detail (variable lists, units, cadence, domain). A subset ofavailable_datasets.
Uncurated ids still work — pass any id copernicusmarine.describe()
recognises straight to CMEMS(variables={id: [...]}).
from collections import Counter
from earthlens.cmems import Catalog
cat = Catalog()
print(f'available_datasets (index): {len(cat.available_datasets)}')
print(f'curated datasets: {len(cat.datasets)}')
print(f'curated is subset of index: {set(cat.datasets) <= set(cat.available_datasets)}')
available_datasets (index): 1251 curated datasets: 1141 curated is subset of index: True
Curated datasets by domain¶
Every curated row carries a domain label inferred from its CMEMS
product id. This is also how the catalog files are split on disk
(catalog/global-*.yaml, catalog/mediterranean.yaml, …).
by_domain = Counter(d.domain for d in cat.datasets.values())
for domain, n in by_domain.most_common():
print(f' {domain:15s} {n:4d}')
by_cadence = Counter(d.cadence for d in cat.datasets.values())
print('\nby cadence:')
for cadence, n in by_cadence.most_common():
print(f' {cadence:12s} {n:4d}')
global 424 ibi 146 mediterranean 131 black-sea 112 nw-shelf 95 indicator 80 polar 68 baltic-sea 52 arctic 33 by cadence: daily 430 irregular 378 monthly 193 hourly 69 annual 41 climatology 22 6hourly 4 weekly 4
Search the index by keyword¶
available_datasets is just a list of ids — grep it for the basin /
theme / cadence token you want. CMEMS encodes a lot in the id itself
(_phy physics, _bgc biogeochem, _wav wave, _P1D-m daily mean,
med Mediterranean, …).
def search(token, limit=8):
hits = [d for d in cat.available_datasets if token in d]
print(f'{token!r}: {len(hits)} matches')
for d in hits[:limit]:
curated = ' (curated)' if d in cat.datasets else ''
print(f' {d}{curated}')
if len(hits) > limit:
print(f' ... and {len(hits) - limit} more')
search('glo_phy_my')
print()
search('_wav_')
'glo_phy_my': 32 matches c3s_obs-si_glo_phy_my_nh-l3_P1M (curated) cmems_mod_glo_phy_my_0.083deg-climatology_P1M-m (curated) cmems_mod_glo_phy_my_0.083deg_P1D-m (curated) cmems_mod_glo_phy_my_0.083deg_P1M-m (curated) cmems_mod_glo_phy_my_0.083deg_static (curated) cmems_obs-mob_glo_phy_my_0.125deg_P1D-m (curated) cmems_obs-mob_glo_phy_my_0.125deg_P1M-m (curated) cmems_obs-mob_glo_phy_mynrt_0.125deg-climatology-uncertainty_P1M-m (curated) ... and 24 more '_wav_': 34 matches cmems_mod_arc_wav_my_3km-climatology_P1M-m cmems_mod_arc_wav_my_3km_PT1H-i cmems_mod_bal_wav_anfc_PT1H-i (curated) cmems_mod_bal_wav_anfc_static (curated) cmems_mod_bal_wav_my_2km-climatology_P1M-m (curated) cmems_mod_bal_wav_my_PT1H-i (curated) cmems_mod_bal_wav_my_aflux_PT1H-i (curated) cmems_mod_bal_wav_my_static (curated) ... and 26 more
Inspect one curated dataset¶
Once you have an id, get_dataset gives the full curated row and
get_variable resolves a single (dataset, variable) pair — units and
long-name without ever touching the network.
ds = cat.get_dataset('cmems_mod_glo_phy_my_0.083deg_P1D-m')
print(f'product: {ds.product}')
print(f'title: {ds.title}')
print(f'cadence: {ds.cadence} domain: {ds.domain}')
print(f'temporal: {ds.temporal.start} -> {ds.temporal.end}')
print('variables:')
for name, var in sorted(ds.variables.items()):
print(f' {name:10s} {var.units:10s} {var.long_name}')
product: GLOBAL_MULTIYEAR_PHY_001_030 title: daily mean fields from Global Ocean Physics Analysis and Forecast updated Daily cadence: daily domain: global temporal: 1993-01-01 -> None variables: bottomT degrees_C Sea water potential temperature at sea floor mlotst m Ocean mixed layer thickness defined by sigma theta siconc 1 Sea ice area fraction sithick m Sea ice thickness so 1e-3 Sea water salinity thetao degrees_C Sea water potential temperature uo m s-1 Eastward sea water velocity usi m s-1 Eastward sea ice velocity vo m s-1 Northward sea water velocity vsi m s-1 Northward sea ice velocity zos m Sea surface height above geoid
Next steps¶
Pick an id + variable from above and hand it to a download — see the quickstart for the facade call. The other notebooks in this folder show concrete workflows: GLORYS thermocline (depth axis), PISCES chlorophyll (multi-variable seasonal cycle), altimetry SLA (coastal time-series), Arctic sea ice (polar map), global waves, and Mediterranean SST (regional map).