-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
Module name will automatically be added to the tag list provided by user
Account for the case where the user has already provided a tag of the same name as the module name.
Not tested
There are now tests for adjustment functions, as well as some fix due to testing.
Codecov Report
@@ Coverage Diff @@
## master #295 +/- ##
==========================================
+ Coverage 71.44% 72.23% +0.78%
==========================================
Files 70 71 +1
Lines 9869 10239 +370
==========================================
+ Hits 7051 7396 +345
- Misses 2818 2843 +25
Continue to review full report at Codecov.
|
For some reason the auto-tag stuff has leaked into this. I'll try to weed it out somehow. I guess I |
|
Hi Janis, the computation of spatial boundaries is not exact. We must take grid cell boundaries into account. Each value in the
If not, the boundaries are
equidistant grids presumed. There is already code that computes boundaries as described: workspace.py |
Do you have a conventions reference for this? I've seen CCI datasets that treat lat_min pointed to a pixel boundary, but I've also seen plenty pointing to the actual 'minimum' of the coordinate vector. |
It is in the CF convention. As most CCI datasets apply them you'll find lat[0] = 90 - 0.5 * res and lat[-1] = -90 + 0.5 * res, so that the boundaries are -90, +90 for global coverage. |
Do you remember which ones? |
You mean lat[0] would be something like -180 and lat[-1] would be 180? I think that's the case in all datasets we manage to open. In fact, we had a problem with data access when that's not the case, so I think all of them are now reversed to that, if not already the case. |
No! |
Lat cannot be 180 :) |
Yes, -90, 90 :) |
I fact, I meant the opposite, lat[0] = 90. That means, if you display the grid as an image you would see in in the correct orientation with N up, S down. |
We have both cases in CCI |
Well, yes, we don't handle lat[0]=90 grids well. We even had an issue on this. I think we're reversing them now upon access. |
Btw, my example above is a bad one as it uses 2D lat, lon coordinate arrays. |
oc-cci has it's lat values going from +90 to -90 |
Which I like |
From
|
That's definitely wrong! |
Or it is correct, because they cut off half a grid cell at both ends for some reason (e.g. anti-meridian problem, he, he). |
OK, yes, I agree, if that denotes a bounding box of the dataset, then it shouldn't cut pixels. As simple as that :) |
See: #196 |
Yepp. |
Yes, we don't reverse it upon reading, sm data goes from 90 to -90:
OK, this is good to realize (again, I guess), as that might make a difference in some ops. Cool, then I'm off to implementing the changes you suggested! Thanks for taking the time to look at the PR! :) |
Great |
A uniform way for handling updates to global attributes along with associated changes in operations, tests and documentation.
Closes #294
Closes #223