-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core functionality for fx variables handling in volume and area statistics in light of PR 439 (PR 439 child 2) #511
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed about a quarter for now. Still pretty big. The feature list in the PR description probably would be a good starting point to break this up further. But maybe we can take it like this for this time.
Co-Authored-By: Klaus Zimmermann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with _recipe.py
for now. Will deal with tests in a later round.
review totally appreciated @zklaus - I'll address the suggestions today 🍺 |
… vars preproc ancestry for ease of removal in the future
OK so due to all these changes, even if the tests cover most of the thing, I retested with a comprehensive functional test (a big recipe) and all is well 👍 |
@zklaus @bouweandela dudes what's your say - we are starting to rely even more on this to be merged and am aware of its shortcomings and kluges but at the moment it'll prove more useful if merged than sitting in a corner - can we try and see about this? Muchos gracias 🍺 |
That really underscores the importance of smaller and cleaner PRs to begin with. After all, nobody needs a code review to know that 90 lines of code and 7 levels of indentation in one function are not appropriate. Anyway, I'll copy here the open discussion from the side PR #522: @zklaus wrote:
@valeriupredoi wrote:
@zklaus wrote:
@valeriupredoi wrote:
@zklaus wrote:
|
That is a very good question! The workflow for fx files that are used for area/volume/zonal_statistics is fundamentally different and herein lies the tricksy nature of this PR (well, the part of it that deals with preprocessing these data):
This is a kludge - just because variable-fxvariable coupling is unavailable in a true sense now, given the current architecture. @bouweandela and myself we can work next using iris' new cell_measure functionality so we can do this in an elegant and practical way. Note that this method is relatively foolproof ie it is not prone to fail unexpectedly - if it fails, it fails due to an issue in the preprocessing step that's easy to trace. About regridding - at the moment both the mask and model data will be regridded which is bad, but then again we can always put the area/volume/zonal_statistics preprocessor before the regridding step; we can also include the regrid as a prohibited step for the fx data just as are the time preproc steps. I left that out so I can talk to you about it - and here we are, talking about it 😁 |
also to note: the preprocessor steps applied to fx data are a subset of the main variable they're associated with: [step1, step2...stepN] where stepN is the last step just before area/volume/zonal_statistics, everything that follows after that for the main var preprocessor is not applied to the fx variable; also step1-N do not include any time preprocessors |
…x_files in preprocessor step
Really like these last changes at a glance! Will do in-depth review tomorrow. Of course, the |
cheers dude, done it, and also simplified and added test - now the user can define his own fx variables no matter what mask preproc |
this is a terribly outdated branch, together with the other sisters, they awere useful to @ledm and @LisaBock I believe, but I think it's about time to retire them (close them) - what do you think @zklaus and @bouweandela - do we maybe want to recycle some of this functionality towards implementing the cell measures stuffs with new iris? |
Maybe keep it around until #999 is merged? |
I believe we can close this since #999 got merged, can't we? @valeriupredoi |
Since V wanted to close them for a long time, I'll do it now. @valeriupredoi, @bouweandela please reopen if you disagree. |
Before you start, please read CONTRIBUTING.md.
Tasks
yamllint
to check that your YAML files do not contain mistakesIf you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
READ BEFORE PROCEEDING
Issue #436 lays down the need for preprocessing fx variables as integrated with
area_atatistics
andvolume_statistics
; PR #439 implements that; reviewers expressed their consternation that that PR is huuuge so it got broken down; the layout for the PR 439 children is outlined in #436 (comment)This is the 2nd child which contains the bulk of the new functionality.
Features