NCAS-CMS / NCAS-CMS/cf-python

Conservative regridding from rotated pole to OSGB grid

Open
#196 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
150
Forks
23
Avg merge
1d 11h
Merged PRs (30d)
2

Description

Hi,

I'm trying to carry out conservative regridding of a netcdf from the EuroCordex rotated-pole grid onto a regular OSGB grid (although at this point, I'd settle for a regular lat-lon grid). Linear interpolation works fine, but when I try to carry out conservative regridding, I get an error message: Source <CF AuxiliaryCoordinate: longitude(412, 424) degrees_east> coordinates must have contiguous, non-overlapping bounds for conservative regridding.

The auxiliary coordinates are 2d arrays of latitude & longitude, while the dimension coordinates are 1d vectors of rotated latitude and rotated longitude. The auxiliary coordinates do have bounds in the original .nc file - I've checked using R and each bounded quadrilateral shares two vertices with each neighbour, suggesting that they define contiguous, non-overlapping regions. I've tried setting and resetting the bounds of the main dimension coordinates in both the source and grid files, but haven't been able to reset the bounds of the auxiliary coordinates that seem to be causing the problem. Can you advise the best way to resolve this issue to allow conservative regridding of rotated-pole data onto a regular OSGB grid?

(details of source data here, details of target grid here)

Thanks,
Clair

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.

Research direction

Start by comparing the attached nc-dump.txt source metadata with grid-dump.txt, focusing on the auxiliary longitude and latitude bounds used by conservative regridding. Trace the conservative regridding entry point that validates contiguous, non-overlapping bounds; done means rotated-pole data can be conservatively regridded without that validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.