Skip to content

Adds an additional test reference for model level index ObsFunction - #571

Open
mikecooke77 wants to merge 7 commits into
developfrom
feature/modellevels
Open

Adds an additional test reference for model level index ObsFunction#571
mikecooke77 wants to merge 7 commits into
developfrom
feature/modellevels

Conversation

@mikecooke77

@mikecooke77 mikecooke77 commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR updates the model_level_index_obs.nc4 test file so that it contains one additional test reference array to allow for an update to the ufo_function_modellevelindex ctest in ufo.

Issue(s) addressed

Resolves ufo#4160

Dependencies

To be merged with the following associated PRs:

Impact

None as the default behaviour is unchanged.

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have run the unit tests before creating the PR

@mikecooke77 mikecooke77 self-assigned this May 27, 2026
@mikecooke77 mikecooke77 added the coordinate merge Ready for merge but needs to be coordinated with other repos label May 27, 2026
@ReubenHill

Copy link
Copy Markdown
Contributor

So which way does the rounding go with this new test reference? If I have something exactly between levels 1 and 2, does it round to 1 or to 2?

@mikecooke77

Copy link
Copy Markdown
Collaborator Author

So which way does the rounding go with this new test reference? If I have something exactly between levels 1 and 2, does it round to 1 or to 2?

Its the same as the previous function i.e. 1.5 becomes level 1 because the weight has to be greater than 0.5 for it to have the additional one added.

@ReubenHill

Copy link
Copy Markdown
Contributor

So which way does the rounding go with this new test reference? If I have something exactly between levels 1 and 2, does it round to 1 or to 2?

Its the same as the previous function i.e. 1.5 becomes level 1 because the weight has to be greater than 0.5 for it to have the additional one added.

Is that not the reverse of what one might expect? I.e. 1.5 would conventionally round to 2.

@mikecooke77

Copy link
Copy Markdown
Collaborator Author

So which way does the rounding go with this new test reference? If I have something exactly between levels 1 and 2, does it round to 1 or to 2?

Its the same as the previous function i.e. 1.5 becomes level 1 because the weight has to be greater than 0.5 for it to have the additional one added.

Is that not the reverse of what one might expect? I.e. 1.5 would conventionally round to 2.

Yes I agree. I did it like this to match the previously approved function which had to use a less than rather than a less than or equals too. In practise for GNSSRO it made no difference to the output.

@ctgh and @ReubenHill do you both agree it should round up? If so I will change.

@ctgh

ctgh commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

That sounds good to me, thanks.

@mikecooke77

Copy link
Copy Markdown
Collaborator Author

OK changed in this datafile and the ufo pr

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

Labels

coordinate merge Ready for merge but needs to be coordinated with other repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants