Data Analysis Tools
This training provides talks and interactive user sessions on real data using the cf-python and cf-plot Python tools that help users to read, analyse and plot atmospheric model data. This will be of benefit to Masters, Doctoral students and PDRAs upwards both within NCAS and the broader atmospheric community both within the UK and abroad.
The cf-python and cf-plot Python packages build on the CF metadata conventions to provide powerful extraction, regridding and visualization capabilities of netCDF, Met Office PP and fields files. Operations such as reading, grid transformation and plotting of contours and vectors can be performed in a single line of code making for quick analysis and plotting of data.
As an example the below uses six lines of code to read in two data sets on different grids and to make a difference contour plot on one of the grids.
import cfplot as cfp
temp_era40 = cf.read_field('data2.nc')
temp_era_in = cf.read_field('data3.nc')
temp_regrid = temp_era_in.regrids(temp_era40, method='bilinear')
cfp.con(temp_regrid-temp_era40, lines=False, title='era_interim - era40 difference')
Further information on the tools and current capabilities can be found at:
The cf-python and cf-plot tools are Python based and we will be using the Jupyter notebook environment on the training day. You should have previous Python experience or have been on the Introduction to Scientific Computing training to get the most out of these tools.
The course will use the Python 3 versions of cf-python and cf-plot which are available for the Linux and Mac operating systems.