Skip to content

Support UK radar data#1825

Open
BernardClaxton (BernardClaxton) wants to merge 60 commits intomainfrom
1759_import_nimrod
Open

Support UK radar data#1825
BernardClaxton (BernardClaxton) wants to merge 60 commits intomainfrom
1759_import_nimrod

Conversation

@BernardClaxton
Copy link
Copy Markdown
Contributor

@BernardClaxton BernardClaxton (BernardClaxton) commented Nov 27, 2025

Fixes #1759

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@Sylviabohnenstengel
Copy link
Copy Markdown
Member

for info if the upgrade of you branch with main causes problems then I have created a branch of your branch and merged main in now including the addition of plotting transverse mercator. So you should be able to plot the radar data.
Branch: #1759_import_nimrod_merge_main

@Sylviabohnenstengel
Copy link
Copy Markdown
Member

Sylvia Bohnenstengel (Sylviabohnenstengel) commented Jan 20, 2026

#https://github.com/MetOffice/CSET/tree/1759_import_nimrod_merge_main adds nimrod radar switch into rose gui and enables nimrod switch in flow.cylc for the workflow.

@jfrost-mo James Frost (jfrost-mo) changed the title supporting UK radar data Support UK radar data Jan 23, 2026
Copy link
Copy Markdown
Member

@jfrost-mo James Frost (jfrost-mo) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/CSET/cset_workflow/app/fetch_fcst/bin/fetch_data.py is the main file for this change, as the stuff in fetch_nimrod is largely unused.

What is our plan with this? Are we going to try and reuse the RES capability in cube_utils? Or do we not really need it given the existing capabilities of CSET?

The recipe and such looks broadly sensible, though I think we can get away with hard-coding some more for the initial simple recipe.

Comment thread src/CSET/cset_workflow/flow.cylc Outdated
Comment thread src/CSET/loaders/spatial_field.py Outdated
Comment thread src/CSET/recipes/surface_fields/generic_surface_spatial_plot_sequence_radar.yaml Outdated
Comment thread src/CSET/recipes/surface_fields/generic_surface_spatial_plot_sequence_radar.yaml Outdated
Comment thread src/CSET/recipes/surface_fields/generic_surface_spatial_plot_sequence_radar.yaml Outdated
Comment thread src/CSET/cset_workflow/app/fetch_fcst/bin/fetch_data.py
Comment thread src/CSET/cset_workflow/app/fetch_fcst/bin/fetch_data.py Outdated
Comment thread src/CSET/cset_workflow/app/fetch_fcst/bin/fetch_data.py Outdated
Comment thread src/CSET/cset_workflow/app/fetch_nimrod/bin/cube_utils.py Outdated
Comment thread src/CSET/cset_workflow/app/fetch_nimrod/bin/fetch-nimrod.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 29, 2026

Coverage

@SGallagherMet Stephen Gallagher (SGallagherMet) added the R2O Trials Items of significance to the Met Office Research to Operations Team. label Feb 16, 2026
@jfrost-mo James Frost (jfrost-mo) marked this pull request as ready for review April 13, 2026 09:52
The radar configuration was moved to the Observation rose meta
directory.
Using a positional argument was only added in python 3.13.
This matches the new location of the other observation settings.
Copy link
Copy Markdown
Member

@jfrost-mo James Frost (jfrost-mo) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking sensible. I've left quite a few comments, but most of them are mechanical cleanup; I'll apply some myself to get the comment count down.

It would be good to see some tests for fetch_nimrod; we can work on them together to validate it is doing the correct things.

We also need to have a think about where fetch_nimrod will live. Its is a reasonable size piece of functionality, which makes me want to have it in the public repository, both for better integration into tests, as well as to allow it to serve as an example for others adding their own radar. On the other hand, it contains a number of Met Office specific tasks, and more broadly I think NIMROD is a Met Office specific format, which will limit the ability for it to be run elsewhere. My suggestion is to factor out the paths and such (which are mostly in the nimrod_dict already) into a separate data file and have that in the restricted repository, but leave the bulk of the code here.

Comment on lines +112 to +113
values="rainaccum_comp_hour", ""
value-titles=rainaccum_comp_hour, off
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a boolean toggle? Or are there cases when we will have multiple options?

Comment thread src/CSET/operators/plot.py Outdated
Comment thread src/CSET/operators/plot.py Outdated
Comment thread src/CSET/cset_workflow/app/fetch_nimrod/bin/fetch_nimrod.py Outdated
Comment on lines +133 to +141
* NIMROD_FIELDs
#* ANALYSIS_OFFSET
#* ANALYSIS_LENGTH
#* CYLC_TASK_CYCLE_POINT
* DATA_PATH
#* DATA_PERIOD
#* DATE_TYPE
#* MODEL_IDENTIFIER
* ROSE_DATAC
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check this list is up-to-date.

Comment thread src/CSET/cset_workflow/app/fetch_nimrod/bin/fetch_nimrod.py Outdated
Comment on lines +231 to +241
# Write the Nimrod weights to a NetCDF file.
filename_wei_nc = (
nimrod_dir_wei
+ "/"
+ f"{date_use.strftime('%Y%m%d%H%M')}"
+ "_"
+ nimrod_dict[nimrod_field]["obs_id"]
+ "_weights"
)
filename_wei_nc = Path(filename_wei_nc).with_suffix(".nc")
iris.save(nimrod_cube_weights, filename_wei_nc)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to save the weights if we have already applied them to the data?

return variables


def _nimrod_dictionary() -> dict:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this read from a data file that can be put into the restricted repository as a site-specific file?

Co-authored-by: James Frost <james.frost@metoffice.gov.uk>
Co-authored-by: James Frost <james.frost@metoffice.gov.uk>
Co-authored-by: James Frost <james.frost@metoffice.gov.uk>
Co-authored-by: James Frost <james.frost@metoffice.gov.uk>
Co-authored-by: James Frost <james.frost@metoffice.gov.uk>
This is mostly to satisfy my type checker that nimrod_dir_wei is set
when used.
Comment thread src/CSET/cset_workflow/meta/observations/rose-meta.conf
@jfrost-mo
Copy link
Copy Markdown
Member

Be warned that plotting spatial plots for 5 minutely data takes ages.

@jfrost-mo
Copy link
Copy Markdown
Member

James Frost (jfrost-mo) commented Apr 21, 2026

Rainfall rate Composite will also want a colourbar, so the 5 minutely data displays sensibly.

My run: https://wwwspice/~james.frost/CSET-radar-test/

@BernardClaxton
Copy link
Copy Markdown
Contributor Author

image

Nimrod 5 minute rainfall rates now plots using the same logarithmic colourbar as the other rainfall plots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request R2O Trials Items of significance to the Met Office Research to Operations Team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Importing Nimrod radar observations

5 participants