seagrid.sources.model.smoc#

Copernicus SMOC hourly surface currents.

Module Attributes

DLAT

Grid spacing of SMOC in degrees.

Functions

a_to_c_grid(ds)

Interpolate uvel/vvel from an Arakawa A grid to a C grid.

Classes

SMOC([variant])

SMOC: hourly surface currents (circulation + tides + Stokes drift).

class seagrid.sources.model.smoc.SMOC(variant=None, **overrides)[source]#

Bases: CopernicusSource

SMOC: hourly surface currents (circulation + tides + Stokes drift).

Hourly zonal and meridional velocities for general circulation (uo/vo), tides (utide/vtide), Stokes drift (vsdx/vsdy) and their sum (utotal/vtotal, returned as uvel/vvel), on a regular 1/12° grid from 80°S to 90°N. One file per day holds 24 hours; timetype="hourly" returns the hour of dtm, timetype="daily" the daily mean.

Settings section [smoc]. Copernicus Marine login. DOI 10.48670/moi-00016.

Examples

>>> import seagrid
>>> smoc = seagrid.get_source("smoc")
>>> smoc.filename("2023-01-01 06:00")
'SMOC_20230101_R20230101.nc'
>>> smoc.grid().shape
(2041, 4320)
Parameters:
  • variant (str | None)

  • overrides (Any)

land_from: ClassVar[str] = 'nan'#

"gebco" (GEBCO elevation on the source grid), "flags" (the GHRSST L4 mask variable) or "nan" (cells where a model’s surface field is missing; models have no clouds, so only land is missing).

Type:

Where landmask() takes land from

seagrid.sources.model.smoc.a_to_c_grid(ds)[source]#

Interpolate uvel/vvel from an Arakawa A grid to a C grid.

On the A grid all velocity components share the T-cell centres. On the C grid (the NEMO convention used by GLORYS) U(i, j) sits on the east face of T-cell (i, j) and V(i, j) on its north face. Both are a two-point average with the eastern or northern neighbour. Longitude is periodic, so uvel wraps exactly at the dateline; for vvel the northernmost row wraps to the southernmost, which is unphysical, so mask or discard the last latitude row if needed.

Parameters:

ds (xarray.Dataset) – Dataset with uvel and vvel on lat/lon.

Returns:

xarray.Dataset – Copy of ds with uvel and vvel on the C grid. The dimensions are unchanged; the half-cell stagger is implicit in the index convention.

Return type:

Dataset