MetOffice / MetOffice/CDDS

`mip_convert` bug (more than one frequency of the same variable).

Open
#841 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
8
Forks
7
Avg merge
1d 15h
Merged PRs (30d)
23

Description

This bug was encountered in https://github.com/MetOffice/CDDS/pull/839.

When running two frequencies of the same variable in the same mip_convert.cfg, it causes some rather unhelpful errors. e.g.
```
[stream_onm_grid-T]
CMIP7_ocean@mon = zostoga_tavg-u-hm-sea

[stream_ond_grid-T]
CMIP7_ocean@day = zostoga_tavg-u-hm-sea
```

This isn't an issue that should occur for users at the moment as our workflows run the different frequencies as separate mip convert jobs. However, it might be good to add some defensive code if this could potentially happen in future.
An attempt to fix it was made as referenced in this comment:
More info here: https://github.com/MetOffice/CDDS/pull/839#issuecomment-4003773679

It worked, but broke a lot of tests, and i wonder if there's a simpler way to fix it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the duplicate-frequency example in mip_convert.cfg and the attempted change discussed in PR 839's linked comment. Reproduce the failure with two frequencies for the same variable, then inspect which tests broke under the attempted fix. Done means duplicate frequencies are handled defensively without unhelpful errors and the existing test suite remains passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.