duncanwp / covid-19_shapecutter

Met Office COVID-19 response: Cutting gridded data with shapefiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

covid-19_shapecutter

Met Office COVID-19 response: Cutting gridded data with shapefiles

Shapecutter example notebook

This repo contains an example of how to subset a gridded NetCDF file with a shapefile polygon using:

  • Iris for data loading, subsetting and statistical processing
  • Cartopy for loading and reading shapefiles
  • shape_utils.py for using shapefiles to subset an Iris cube.
  • Pandas to collate the data into a tabular form and save out to a Comma Separated Vector (CSV) file.

You will need Jupyter installed in order to use this notebook.

Cloning this repository

You can clone this repository using git:

git clone https://github.com/informatics-lab/covid-19_shapecutter.git

Software Environment

You an use conda to install the right software dependencies, including Jupyter, as directed in the environment.yaml:

conda env create --file environment.yaml

About

Met Office COVID-19 response: Cutting gridded data with shapefiles


Languages

Language:Jupyter Notebook 56.9%Language:Python 43.1%