MetOffice / MetOffice/ANTS

Extend ancil_create_shapefile.py to support rotating coordinates to a domain

Open
#160 0 comments 0 reactions 1 assignee View on GitHub

@alasdair-roy is already working on this.

Since Jun 24, 2026.

⬆️ high priority
Dominant language
Python
Stars
7
Forks
10
Avg merge
1d 19h
Merged PRs (30d)
5

Description

# ✨ Feature Request

For regional usage, it is desirable to specify the coordinates of a shapefile once in the json but be able to use it for differing rotated pole domains. Rotated pole coordinates can be provided so the points in the json just need rotating the polygon to the new coords before generating the shapefile from them (shapefiles as we have them don't know about coordinate systems so if you tell it it's at X,Y that's what's used when it's applied).

## Requirements

- Add a `--target-lsm` option to ancil_create_shapefile.py to take in a land sea mask for the rotated pole domain
- Extract the rotated pole coordinate details from there
- Take the points defined in the json file and use cartopy to rotate them to the new rotated pole coordinate system
- Generate the shapefile as before but using the rotated points

- Need to make sure it's clear in documentation that the routine assumes the source json is on a standard (unrotated) lat-lon grid
- Logging/outputs should make it clear when a rotation occurs
- Don't do anything to the points should a non-rotated pole lsm get fed in (realistic possibility given this will get plumbed into workflows) - some sort of warning/error should be raised in this case

## Context

This functionality will be used in the Regional Ancillary Suite.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.