MetOffice / CSET

Toolkit for evaluation and investigation of numerical models for weather and climate applications.
https://metoffice.github.io/CSET/
Apache License 2.0
8 stars 1 forks source link

Create common operators script #620

Closed jwarner8 closed 1 month ago

jwarner8 commented 1 month ago

Create common operator script to hold regularly used iris/processing functionality that isn't an operator independently

Fixes #619

Contribution checklist

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

github-actions[bot] commented 1 month ago

Coverage

jwarner8 commented 1 month ago

Linked #619

jfrost-mo commented 1 month ago

If you edit the initial comment, and put the issue number after the "Fixes #" bit, it will properly link, and close the issue when this PR is merged.

jwarner8 commented 1 month ago

I put in the identification of horizontal coordinate names as a generic function useful for many operators as a start. Not convinced if _common_operators.py is the best name though, as might conflate the use of 'common' operators such as regrid which will be used in several recipes. Creative suggestions welcome!

jfrost-mo commented 1 month ago

Not very creative, but _operator_utils.py? Or even just _utils.py, but inside the operators subdirectory.

jwarner8 commented 1 month ago

If its not used anywhere in the current code, we can still go ahead and merge it, and you'll want to update your Age of Air branch to take advantage of it.

After this gets merged, it will immediately be used within the regrid operator, and I will create a new PR/issue for updating this operator to use the common function. Then, I will work on the age of air review, which uses the regrid operator as part of the recipe. The cross section work will directly make use of the common function too

jwarner8 commented 1 month ago

If its not used anywhere in the current code, we can still go ahead and merge it, and you'll want to update your Age of Air branch to take advantage of it.

After this gets merged, it will immediately be used within the regrid operator, and I will create a new PR/issue for updating this operator to use the common function. Then, I will work on the age of air review, which uses the regrid operator as part of the recipe. The cross section work will directly make use of the common function too

I figured probably easier to merge this first and then update regrid, rather than update regrid operator in this PR too (so the PR's have a clear separate purpose)?

jfrost-mo commented 1 month ago

That works. Only other thing is to add an entry to the top of the changelog (docs/source/changelog.rst), then you can go ahead and merge this.