MetOffice / MetOffice/CDDS

Silence `IrisUserWarning` related to `qrparm.orog.pp` ancil

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

Description

When working on issue #799 , when those variables are produced. This warning is printed to `mip_convert` output logs in cylc review.

```
iris/fileformats/rules.py:371: IrisUserWarning: Unable to create instance of HybridHeightFactory. The source data contains no field(s) for 'orography'.
warnings.warn(
```
The data is still produced successfully, so Matt recommended silencing this warning. I tried adding it to the warning filters in [CDDS/mip_convert/mip_convert/load/iris_load_util.py](https://github.com/MetOffice/CDDS/blob/main/mip_convert/mip_convert/load/iris_load_util.py)
and
https://github.com/MetOffice/CDDS/blob/main/mip_convert/mip_convert/new_variable.py

And a few other places in those files. However i can't seem to be able to silence those warnings successfully.

Making this issue as the problem is relatively minor and i need to focus on my current issue.

Note:
It seems to be caused by `qrparm.orog.pp` not currently appearing in the `ancil_filenames` section in the model config file: https://github.com/MetOffice/CDDS/blob/main/cdds/cdds/common/plugins/cmip7/data/model/UKCM2-0-LL.json

If it's added in there, the warning disappears. However, Matt has advised me not to add it, and that silencing the warn would be a better option.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the warning through the mip_convert entry point, then read mip_convert/mip_convert/load/iris_load_util.py and mip_convert/mip_convert/new_variable.py. Check the UKCM2-0-LL.json ancil_filenames configuration for context, and consider the warning resolved when qrparm.orog.pp remains unlisted while mip_convert output no longer prints this warning.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.