• Operate eagerly on NumPy inputs and lazily on Dask inputs • Follow existing metadata standards. (Be as flexible as possible about variable or dimension names) • Keep it as simple as possible! Solve one problem well —> lots of small packages !2 D e s i g n P r i n c i p l e s
e V o l u m e C a l c u l u s !3 7/9/2019 grid2d_hv.svg C-grid — horizontal view C-grid — vertical view t u w w u w u w u u w u w X Z Y t u v v f f u f f X Y Z Fundamental Operations Interoperation Difference x = 1 2 ( i +1 / 2 + i 1 / 2 ) x = i +1 / 2 i 1 / 2 These move us from one grid position to another. Example Derived Quantities ⇣ = @u @y + @v @x ⇣ = ( y xcu + x ycv ) /A⇣ Vorticity https://xgcm.readthedocs.io/
Grid is the primary user interaction point with xgcm. Very small API. zeta = (- grid.diff(ds.UVEL * ds.dxC, 'Y') + grid.diff(ds.VVEL * ds.dyC, 'X'))/ds.rAz
• Automatically generates spectral coordinates in output • Dispatches numpy.fft or dask.fft appropriately • Utility functions (e.g. detrending) X R F T: N D - S p e c t r a l A n a ly s i s !5 https://xrft.readthedocs.io/
m https://xhistogram.readthedocs.io • Calculate complex histograms with multi-dimensional data • Operate over selected axes of arrays • Generate histogram labels for xarray datasets • Uses dask intelligently