Support UK radar data#1825
Conversation
|
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. |
|
#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. |
James Frost (jfrost-mo)
left a comment
There was a problem hiding this comment.
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.
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.
James Frost (jfrost-mo)
left a comment
There was a problem hiding this comment.
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.
| values="rainaccum_comp_hour", "" | ||
| value-titles=rainaccum_comp_hour, off |
There was a problem hiding this comment.
Should this be a boolean toggle? Or are there cases when we will have multiple options?
| * NIMROD_FIELDs | ||
| #* ANALYSIS_OFFSET | ||
| #* ANALYSIS_LENGTH | ||
| #* CYLC_TASK_CYCLE_POINT | ||
| * DATA_PATH | ||
| #* DATA_PERIOD | ||
| #* DATE_TYPE | ||
| #* MODEL_IDENTIFIER | ||
| * ROSE_DATAC |
There was a problem hiding this comment.
Check this list is up-to-date.
| # 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) |
There was a problem hiding this comment.
Do we need to save the weights if we have already applied them to the data?
| return variables | ||
|
|
||
|
|
||
| def _nimrod_dictionary() -> dict: |
There was a problem hiding this comment.
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.
9bb07f8 to
7e8590b
Compare
The number of radar sites can change, preventing the cubes from merging. Therefore the respective cube attributes are stripped.
|
Be warned that plotting spatial plots for 5 minutely data takes ages. |
|
|

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