1 Installation

See setup instructions for detailed installation options, including via the python package pdm, conda and docker.

If the python clim-recal package is installed, some of the components can be used via the command line. For details run:

$ clim-recal --help

2 Data Preparation Pipeline

The python clim-recal package supports two main functions:

  1. Downloads the UK Met Office observation and projection data
  2. Converts that data to aligned spatial time series grids for debiasing

We currently provide the the following converted and aligned files in our Download Datasets page:

  • Maximum temparture: tasmax
  • Maximum temparture: tasmin
  • Rainfall: rainfall/pr

We provide 5 projection runs:

  • 01
  • 05
  • 06
  • 07
  • 08

We demonstrate the advantage of focusing on 05 through 08 in Identifying Runs.

Below is how these files are produced.

2.1 Download UK Met Office data

We use two datasets maintained by the Met Office

This data can be quite large and take significant amounts of time to download.

To download this an account is needed. The registration process can be found here: https://services.ceda.ac.uk/cedasite/register/info/.

We hope to incorporate this module in the clim-recal command line interface in future, but at present the ceda_ftp_download.py module is used to download this data and can be run from the command line via python3:

$ cd clim-recal/python/clim_recal
$ ./ceda_ftp_download.py  --help
usage: ceda_ftp_download.py [-h] --input INPUT [--output OUTPUT] --username
                            USERNAME --psw PSW [--reverse] [--shuffle]
                            [--change_hierarchy]

options:
  -h, --help           show this help message and exit
  --input INPUT        Path where the CEDA data to download is located. This can be
                       a path with or without subdirectories. Set to
                       `/badc/ukcp18/data/land-cpm/uk/2.2km/rcp85/` to download all
                       the raw UKCP2.2 climate projection data used in clim-recal.
  --output OUTPUT      Path to save the downloaded data
  --username USERNAME  Username to connect to the CEDA servers
  --psw PSW            FTP password to authenticate to the CEDA servers
  --reverse            Run download in reverse (useful to run downloads in
                       parallel)
  --shuffle            Run download in shuffle mode (useful to run downloads in
                       parallel)
  --change_hierarchy   Change the output sub-directories' hierarchy to fit the
                       Turing Azure fileshare hierarchy (only applicable to UKCP
                       climate projection data, i.e. when --input is set to

2.2 Aligning HADs and CPM UK data

These dataset are provided in the following forms

Dataset Resolution Coordinates Calendar
UKHAD 1 km British National Grid1 Standard
RCP8.5 2.2 km Rotated Pole2 360 day

To align them we:

  1. Interpolate RCP8.5 to standard Gregorian calendar via the nearest method3.
  2. Reproject RCP8.5 to British National Grid Coordinate structure.
  3. Resample UKHAD to a 2.2 km grid.
  4. Reproject UKHAD bounds to align with RCP8.5

Links to these files are in the Download Datasets section.

2.3 Running debiasing methods

Once the data is aligned, it is ready for you to run your choice of debiasing methods on it.

Back to top

Footnotes

  1. British National Grid spec: https://epsg.io/27700↩︎

  2. Rotated pole of latitude 37.5 and longitude 177.5. See UKCP Guidance: Data availability, access and formats appendix B.↩︎

  3. See the CPM Projection section for more details, including a comparison with a linear interpolation.↩︎