MetOffice / MetOffice/CDDS

Bug when loading ARISE external project plugin

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

Description

I have recently observed some ARISE processing that removed the halos, even though (at the time of writing) the ARISE plugin has not updated the `halo options` to `halo_removal`.

https://github.com/MetOffice/arise-cmor-tables/blob/38baa036e335e43233ae7f79c6b5b9f077adb8c0/cdds_arise/data/model/UKESM1-0-LL.json#L179

It seems as though the `halo_removal` options were are still finding their way into the `mip_convert` configuration files produced by `configure`

```
[halo_removal]
stream_onm = 1:-1,1:-1
```
We can see that the Arise plugin is loaded.

```python
108 plugin = PluginStore.instance().get_plugin()
109 output_file_template = plugin.model_file_info().output_file_template
110 breakpoint()
111 # Produce the contents of the 'user configuration files' by grid.
112 -> user_configs = OrderedDict()
113 for grid_info, mip_requested_variables in variables_by_grid.items():
114 grid_id, grid, grid_label, nominal_resolution, substream = grid_info
115 if mip_requested_variables:
116 if substream is None:
117 file_suffix = grid_id
(Pdb) plugin

```

However, a few lines later, when trying to retrieve the model parameter information in the call to `get_halo_removal_attributes`, this actually returns the `UKESM1-0-LL` information.

```python
175 plugin = PluginStore.instance().get_plugin()
176 model_id = request.metadata.model_id
177 model_parameters = plugin.models_parameters(model_id)
178 halo_removal_info = model_parameters.halo_removal_info
179 breakpoint()
180 -> removal_attributes: dict[str, str] = {}
181 key_template = 'stream_{}'
182 value_template = '{},{}'
183
184 for stream in request.data.streams:
185 if stream not in halo_removal_info:
(Pdb) model_parameters

```

Looking at the ARISE plugin, it seems that it just returns the `cmip6` UKESM1-0-LL model as is.

https://github.com/MetOffice/arise-cmor-tables/blob/38baa036e335e43233ae7f79c6b5b9f077adb8c0/cdds_arise/arise_plugin.py#L73

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with cdds_arise/arise_plugin.py and trace how PluginStore loads the ARISE plugin and how get_halo_removal_attributes obtains model_parameters during configure. Compare the ARISE model information with the returned UKESM1-0-LL parameters and reproduce the generated configuration containing [halo_removal]. Done means ARISE processing no longer receives halo-removal settings from the unrelated CMIP6 model data.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.