seagrid.sources.model.smoc#
Copernicus SMOC hourly surface currents.
Module Attributes
|
Grid spacing of SMOC in degrees. |
Functions
|
Interpolate |
Classes
|
SMOC: hourly surface currents (circulation + tides + Stokes drift). |
- class seagrid.sources.model.smoc.SMOC(variant=None, **overrides)[source]#
Bases:
CopernicusSourceSMOC: 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 asuvel/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)
- seagrid.sources.model.smoc.a_to_c_grid(ds)[source]#
Interpolate
uvel/vvelfrom 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)andV(i, j)on its north face. Both are a two-point average with the eastern or northern neighbour. Longitude is periodic, souvelwraps exactly at the dateline; forvvelthe northernmost row wraps to the southernmost, which is unphysical, so mask or discard the last latitude row if needed.- Parameters:
ds (
xarray.Dataset) – Dataset withuvelandvvelonlat/lon.- Returns:
xarray.Dataset– Copy of ds withuvelandvvelon the C grid. The dimensions are unchanged; the half-cell stagger is implicit in the index convention.- Return type: