MetOffice / MetOffice/ANTS

Provide a general ANTS app for extracting source region related to target domain

Open
#79 0 comments 0 reactions 0 assignees View on GitHub
✨ enhancement ⬇ low priority
Dominant language
Python
Stars
7
Forks
10
Avg merge
1d 19h
Merged PRs (30d)
5

Description

# ✨ Feature Request

In order to optimise working with some of our larger datasets when working with a domain that would lie inside of them, it is desireable to have standalone functionality that can extract a region of a source file that overlaps with a target domain.

In the general case, when presented with a regional domain, part of the decomposition framework (or two-stage-regrid) will end up running lib/ants/_constraints.py: _extract_overlap to find the area of the source and target regions that overlap.

Overall, this is potentially wasteful in terms of compute and memory throughout the processing chain. Thus, it is proposed to create a general app that extracts and saves the relevant region of the source data for processing in the ancil generation code. We should consider how this works for UG-ANTS too - as nominally the same operations should be useable for both.

## Requirements

A standalone command line interface that can be called directly with a source file and a model target domain that will extract the source region that covers the target domain.

This will need to cope with rotated poles, different longitude min/maxes and polar domains.

We support "padding" of both the target region to be extracted - "this domain + x degrees" - and the resulting area - "get me the overlap with x degrees padding around the edge".

## Context

Potential for use throughout ancillary generation workflow chains to make the selection of related regions a standalone operation that can be completed as a pre-processing step.

Contributor guide

Open the contributing guide

Research direction

Start with lib/ants/_constraints.py and _extract_overlap, then trace its use in the decomposition framework or two-stage-regrid. Define the standalone CLI inputs and behavior for rotated poles, longitude ranges, polar domains, and padding, while considering reuse by UG-ANTS. Done means the app extracts and saves the source region covering the target domain and is covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.