In [1]:
name = '2016-12-02-oop-meteo-example'
title = 'Object-Oriented Programming in meteorological data analysis'
tags = 'oop, iris'
author = 'Adrian Matthews'
In [2]:
from nb_tools import connect_notebook_to_post
from IPython.core.display import HTML, Image
html = connect_notebook_to_post(name, title, tags, author)
Object-oriented programming (OOP) was discussed in the context of a real, fairly complex (meteorological data analysis) situation, as opposed to the very simple class
examples usually given.
The example chosen was the calculation of an annual cycle from many years of gridded data, the subsequent smoothing of that annual cycle, and then the subtraction of the smoothed annual cycle from the original data to create anomaly data.
The script anncycle.py
was used to create an instance of the AnnualCycle
class from the data_analysis
module.
All the code is available on GitHub.
In [3]:
HTML(html)
Out[3]: