Assemble data for the 20CRv2c videoΒΆ

The Twentieth Century Reanalysis version 2c provides data on a 2x2 degree grid back to 1851. The data are online and can be downloaded by the IRData library

Script to collect the variables shown for one calendar year:

#!/usr/bin/env python

import datetime
import IRData.twcr as twcr

for var in ('prmsl','uwnd.10m','vwnd.10m','air.2m'):

As well as the weather data, the plot script needs a land-mask file to plot the continents. This script retrieves that.

#!/usr/bin/env python

# Download everything we need except the 20CR data.
# Store it on $SCRATCH

import os
import urllib.request

# Land mask for plots

dst="%s/fixed_fields/land_mask/" % os.getenv('SCRATCH')
if not os.path.exists(dst):
    if not os.path.isdir(os.path.dirname(dst)):
    urllib.request.urlretrieve(srce, dst)