Usage of Climate Data OperatorsΒΆ

This example shows you how CDOs are binded in the psyplot package.

It requires the 'demo.nc' netCDF file and the psy-maps plugin.

import psyplot.project as psy
cdo = psy.Cdo()
lines = cdo.fldmean(input='-sellevidx,1 demo.nc', plot_method='lineplot', name='t2m',
                    fmt=dict(xticks='month', xticklabels='%b %Y'))
DatetimeIndex(['1979-01-31 18:00:00', '1979-02-28 18:00:00',
               '1979-03-31 18:00:00', '1979-04-30 18:00:00',
               '1979-05-31 18:00:00'],
              dtype='datetime64[ns]', name='time', freq=None)
../_images/example_cdo_0.png
maps = cdo.timmean(input='demo.nc', name='t2m', plot_method='mapplot', fmt=dict(cmap='RdBu_r'))
../_images/example_cdo_1.png
psy.close('all')

Download python script: example_cdo.py

Download Jupyter notebook: example_cdo.ipynb

View the notebook in the Jupyter nbviewer

Run this example interactively: binder

Download supplementary data: demo.nc