Met Office COVID-19 response: Cutting gridded data with shapefiles
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.
You can clone this repository using git:
git clone https://github.com/informatics-lab/covid-19_shapecutter.git
You an use conda to install the right software dependencies, including Jupyter, as directed in the environment.yaml
:
conda env create --file environment.yaml