-
Notifications
You must be signed in to change notification settings - Fork 284
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
Allow exemptions to coordinate axis guessing on save #5003
Comments
@bayliffe Thanks for raising this issue, much appreciated. We think this is an issue that needs addressed 👍 Are you happy to take this issue on yourself with some hand holding? If you don't have time just let us know and we can move this issue forwards for you. |
After a wee bit of developer discussion your issues raises questions how the best mechanism to best control the behaviour that you want... so this may require more thought on our behalf. |
@bayliffe Hmmm there seems to be a few ways to approach this problem in a generic useful way, and TBH this is going to need some considered thought (sorry, no avoiding that). At this point, I suggest that you up-vote your own issue (and get other like minded users/devs to do so too 😉) to make sure that the priority of this issue bubbles to the top of tasks that require to be addressed by @SciTools/iris-devs 👍 Hope that's okay for now? |
I've upvoted as requested - this issue affects our usage of Iris-produced NetCDF with downstream systems (including Visual Weather) at BOM. I'd argue that this issue should be labelled as a bug rather than an enhancement. |
That’s good insight @tjtg. I added the “feature” label, as any mechanism to opt out of current behaviour would be a new feature. However, it never makes sense to think that “air_pressure_at_sea_level” could describe height. If we could change |
Discussed in Peloton, added to 3.5 for time being. |
Had a design discussion with @HGWright recently. None of the below options are without compromise. The current preferred option is a new Tagging all voters: @rcomer @bjlittle @pp-mo @bayliffe @neilCrosswaite @bjwheltor @s-boardman @BelligerG @MoseleyS @PaulAbernethy @simonjackson900 @tjtg @anja-bom @nivnac @thbom001 @btrotta-bom @dmentipl @ivorblockley @benowen-bom @cpelley @gavinevans Adjust
|
Team conclusion: A Using a property provides a space for documenting it, too. We know this affects NetCDF save, plotting, merging, maybe regridding. |
Not currently planning a context manager, but can be persuaded 😉🎂 |
@HGWright @trexfeathers @bjlittle thank you for your work on this. I'm afraid in the turmoil of operational releases, the progress made on this issue completely passed me by at the end of last year. Your efforts are much appreciated and will help us to avoid spurious behaviour in downstream systems ingesting probabilistic pressure data. ❤️ |
Within the iris NetCDF saver there is a call to
guess_coord_axis
. This simple utility relies on coordinate names, units, or other attributes to ascribe an axis identifier to each dimension coordinate where possible. One of these guesses checks whether the units of the coordinate are convertible to hectopascals, and if so presumes the dimension is a pressure coordinate corresponding to vertical levels; an axis identifier of Z is added.Working with probabilistic data in which a dimension coordinate may describe different pressure thresholds, i.e. probability of pressure at mean sea level exceeding 1000hPa, 1010hPa, 1020hPa etc. this results in the threshold coordinate being identified as a vertical spatial dimension with an axis identifier of Z. This is undesirable and causes issues downstream of where the data is created (e.g. in Visual Weather). As this is added on save it is not possible to remove the attribute without using an alternative tool to Iris.
This issue requests that there be a means within Iris of preventing the axis identifiers being added to specific named (or var named) coordinates on save.
Example cube
Below is shown a simple print out of a probabilistic PMSL forecast with a threshold coordinate named
air_pressure_at_sea_level
that has units of Pa, which is not a height coordinate, but which is assigned a Z axis identifier.ncdump header information corresponding to this coordinate:
The text was updated successfully, but these errors were encountered: