Skip to content

Fix lbfc mapping rules#965

Closed
pp-mo wants to merge 4 commits intoSciTools:masterfrom
pp-mo:tidy_lbfc_rules
Closed

Fix lbfc mapping rules#965
pp-mo wants to merge 4 commits intoSciTools:masterfrom
pp-mo:tidy_lbfc_rules

Conversation

@pp-mo
Copy link
Member

@pp-mo pp-mo commented Jan 21, 2014

Addresses: #964

Fixes rule deriving lbfc from CF name+units; includes new "um_cf_map.py" from updated metOcean definitions; remove older rules this replaces.
Mostly wanted to simplify, but also because the existing rules do not check the units which is obviously dubious.

This requires metarelate/metOcean#7 to be merged first.

Prerequisites:

Reviewer: cpelley

@pp-mo
Copy link
Member Author

pp-mo commented Jan 22, 2014

Rebased to fix the Travis failure (cf. #968)

@pp-mo
Copy link
Member Author

pp-mo commented Jan 23, 2014

Rechecked + ready to go.

@pp-mo pp-mo closed this Jan 24, 2014
@pp-mo pp-mo deleted the tidy_lbfc_rules branch January 24, 2014 11:27
@pp-mo pp-mo restored the tidy_lbfc_rules branch January 24, 2014 11:29
@pp-mo
Copy link
Member Author

pp-mo commented Jan 24, 2014

NOTE: I just deleted the branch by mistake, and then restored it. Hopefully this is ok..

@pp-mo pp-mo reopened this Jan 24, 2014
Copy link

Choose a reason for hiding this comment

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

This wasn't a CF name. I realise this has not made it into the update to um_cf_map.py but do you know where wind_gust came from in the first place?

Copy link

Choose a reason for hiding this comment

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

Any ideas @bjlittle, looks like it was your commit:
9728daa

Copy link

Choose a reason for hiding this comment

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

Maybe not, @bjlittle only touched these rather than populating these:
#190
I still think we should understand where these came from.

Copy link
Member Author

Choose a reason for hiding this comment

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

I decided, following consulation with @marqh, that both this and the name "temperature" (above, line 77) are not sensible defiinitions and should simply be removed.
Conceivably this may cause someone problems, but I frankly doubt it, and the most practical way to find out is arguably just to do it + see if anyone complains.
Certainly, the possibility that this may cause someone a problem is not an argument for always leaving functionality as it is, if it is plainly "wrong". In principle, this is no different from our decision that these translations can no longer accept any-old units, which this change is also doing.

Copy link

Choose a reason for hiding this comment

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

...are not sensible defiinitions and should simply be removed...

Agreed

Conceivably this may cause someone problems, but I frankly doubt it, and the most practical way to find out is arguably just to do it + see if anyone complains.

Agreed

Copy link

Choose a reason for hiding this comment

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

newcases only makes sense in the context of the here and now but I don't really that much

Copy link
Contributor

Choose a reason for hiding this comment

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

These look a lot like unit tests to me. Non-mockiphillic, of course.
Is there any reason they're not in the unit tests folder?

Copy link
Contributor

Choose a reason for hiding this comment

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

newcases only makes sense in the context of the here...

especially considering oldcases has been removed from this PR as being superfluous.

Copy link

Choose a reason for hiding this comment

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

These are in the unit tests folder @bblay (lib/iris/tests/unit/fileformats/pp/test_save.py)

Copy link
Contributor

Choose a reason for hiding this comment

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

yes...you passed my test, well done....

@cpelley
Copy link

cpelley commented Jan 27, 2014

Looks good to me, rebase and I think its fine for going in (you might as well rename the unittest name as above at the same time).

@bblay you happy?

@bblay
Copy link
Contributor

bblay commented Jan 28, 2014

@bblay you happy?

I'm happy-go-lucky but I haven't looked at this PR, if that's what you mean.

@marqh marqh mentioned this pull request Jan 28, 2014
@ghost ghost assigned bblay Jan 28, 2014
@bblay
Copy link
Contributor

bblay commented Feb 3, 2014

bump

@cpelley
Copy link

cpelley commented Feb 4, 2014

I think that the unnecessary test_names_to_lbfc_newcases unittest can be removed, then its fine to be merged?

@marqh
Copy link
Member

marqh commented Feb 7, 2014

I am keen to see this merged and the follow up activity #989 also merged

@bblay
Copy link
Contributor

bblay commented Feb 7, 2014

I think that the unnecessary test_names_to_lbfc_newcases unittest can be removed

That test seems to have some small value, even though it only tests a small number of cases. It doesn't seem to be a unit test though, and I don't think the name is appropriate. I agree with @cpelley, please remove.

Note: I would hope that in the future the PP save rules will be written with carefully designed, functionally decomposed Python. In this case, the standard_name to lbfc conversion will probably be encapsulated into a single function suitable for a unit test.

@cpelley
Copy link

cpelley commented Feb 10, 2014

Back to you @pp-mo, minor change then it is ready

@pp-mo
Copy link
Member Author

pp-mo commented Feb 24, 2014

@cpelley Back to you @pp-mo

Thanks @cpelley : now addressed + I hope this is more sensible ?
Please re-review.

@cpelley
Copy link

cpelley commented Feb 25, 2014

Happy with the changes made, ready to merge.
Anyone like to take over from @bblay and merge this?

@cpelley
Copy link

cpelley commented Feb 26, 2014

Summary:

  • The removal of incorrect pp-CF mappings has been questioned from the perspective of changing existing behaviour. A reasoned argument has been accepted that the current behaviour was incorrect and for that reason alone should be removed.
  • Unittest coverage questioned in regard to having coverage of previous translations and all new translations. This has been resolved by the removal of unnecessary tests, in favour a sub sample of translations which test behaviour, with no intent on testing specific rules.

All issues raised have been addressed and the PR is ready.

@cpelley
Copy link

cpelley commented Mar 26, 2014

Bump, I think this PR is ready for merging if it has not become stale. Can you get someone assigned?

@cpelley
Copy link

cpelley commented Apr 23, 2014

Can we get someone to take press the green button on this? Another PR awaits this one (#989).

Copy link
Member

Choose a reason for hiding this comment

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

@pp-mo Have all of these changes been made to this file by hand?

Copy link

Choose a reason for hiding this comment

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

I assume these were added as part of:
https://github.com/metarelate/metOcean/pull/7/files
(As defined in the prerequisites).

@pp-mo can you confirm this for us?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's getting hard to remember (!)
I think this is a manual edit : The metarelate PR mentioned should match these, but I think there were concerns about how quickly that could be done (ha, ha), and how it might merge with other outstanding proposed changes there, so we proposed these changes separately and they have not come "via" metarelate in this case.
We were expecting these changes eventually to be subsumed by a new PR to install the latest metarelate output.

The changes themselves effectively "replace" the buggy rules removed from save_rules.txt (in sensible cases, that is).

@cpelley
Copy link

cpelley commented May 21, 2014

This PR is going quite again :(
From the discussion above, do you intend to make a PR with the https://github.com/metarelate/metOcean repository?

@pp-mo pp-mo unassigned bblay Jun 3, 2014
@marqh marqh mentioned this pull request Jun 3, 2014
@pp-mo pp-mo closed this Jun 25, 2014
@pp-mo
Copy link
Member Author

pp-mo commented Jun 25, 2014

Superceded by #1155

@pp-mo pp-mo deleted the tidy_lbfc_rules branch June 25, 2014 10:38
@pp-mo pp-mo restored the tidy_lbfc_rules branch June 25, 2014 10:38
@pp-mo pp-mo deleted the tidy_lbfc_rules branch March 14, 2016 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants