Concatenating a gridded rainfall reanalysis dataset into a time series

General Preprocessing Standard Python

license binder render review

RoHub doi



To load and extract a region of interest from a gridded rainfall reanalysis dataset, and concatenate into a time series using the Iris package.

Preprocessing description

Time series data allows us to carry out a wide range of analyses including but not limited to trend, seasonality, anomaly detection and causality. As most of the climatological datasets are gridded, we provide a general tool to preprocess them into time series. The example global dataset from NCEP/NCAR reanalysis has a fairly low resolution (T62 Gaussian grid or approximately 1.9 * 1.9 degrees lat/long) which allows easy execution. It is openly available with a variety of atmospheric variables at near surface levels in daily and monthly frequencies as well as long-term monthly mean in NetCDF format, which is described in and can be obtained from the NOAA Physical Sciences Laboratory.

This notebook uses a single sample data file for global daily precipitation rate (monthly mean) included with the notebook.


  • Data for the entire globe is loaded and plotted using Iris

  • Seasonal means are created by aggregating the data

  • The Indonesian Borneo region is extracted and plotted

  • The area-averaged time series for Indonesian Borneo region is created

  • A particular season and timeframe are extracted from the time series



  • Timothy Lam (author), University of Exeter, @timo0thy

  • Marlene Kretschmer (author), University of Reading, @MarleneKretschmer

  • Samantha Adams (author), Met Office Informatics Lab, @svadams

  • Rachel Prudden (author), Met Office Informatics Lab, @RPrudden

  • Elena Saggioro (author), University of Reading, @ESaggioro

  • Nick Homer (reviewer), University of Edinburgh, @NHomer

  • Alejandro Coca-Castro (reviewer), The Alan Turing Institute, @acocac

Dataset originator/creator

  • NOAA National Center for Environmental Prediction (creator)

Dataset authors

  • Eugenia Kalnay, Director, NCEP Environmental Modeling Center

Dataset documentation

Pipeline documentation


NCEP-NCAR Reanalysis 1 data provided by the NOAA PSL, Boulder, Colorado, USA, from their website at

Load libraries

import os
import iris
import iris.quickplot as qplt
import iris.coord_categorisation as coord_cat

import cf_units
import nc_time_axis

import matplotlib.pyplot as plt

import urllib.request

import holoviews as hv
import geoviews as gv

import warnings

%matplotlib inline