cf-python icon indicating copy to clipboard operation
cf-python copied to clipboard

Docs: new recipe to illustrate masking area shapefile

Open sadielbartholomew opened this issue 1 year ago • 0 comments

A user has requested a means to mask certain areas on a plot as defined by a shapefile to outline them.

This is certainly possible via cf-python and cf-plot with some extra logic, potentially including some Cartopy use to facilitate it, but because it is a rather niche request we agreed that instead of adding in-built support this, it would be netter to provide a recipe which showcases how to do it in the former way. (We can mask out land from ocean already by built-in cf-plot funcitonality, but this is for some arbitrary user-provided shape.)

So, we want a new code recipe for the docs which takes a field and a shapefile and applies the shapefile to mask out the shape in the field data, ultimately showing this as a plot.

sadielbartholomew avatar Feb 28 '25 16:02 sadielbartholomew