x4c attaches a .x accessor to xarray.Dataset and xarray.DataArray that
understands CESM conventions — where the grid-cell areas live, how to find latitude
and longitude on an unstructured grid, and how the vertical coordinate is spaced.
Every notebook below runs against the reduced sample case bundled with these docs, so they work from a fresh clone. See the sample case README for what was trimmed out of it. Each notebook is a single, self-contained example — small on purpose, so a page never mixes unrelated features.
Overview — the
.xaccessor and what it attachesAnnualization and seasonalization —
.x.annualize(), including DJF wraparoundSeasonal maps — DJF vs JJA, composed with
.x.plot()Spatial means and climate indices — area-weighted
.x.gm,.x.nhm,.x.shmRegridding: atmosphere — SE grid to regular lat/lon
Regridding: ocean — POP grid to regular lat/lon
Hybrid levels to pressure levels —
.x.get_plev()Model coastlines for a paleo run — the
ssvtrickMap projections at a glance — any Cartopy projection
Regional maps and saving figures —
latlon_range,x4c.savefig()Vertical sections — the meridional overturning circulation
Zonal means — a Hovmöller-style contour
Publication styles —
x4c.set_style()EOF analysis — grid predicates,
.x.eof()Extracting sites —
.x.nearest2d(),.x.nearest3d()Saving derived fields —
.x.to_netcdf()