Replies: 1 comment 3 replies
-
|
Hi @itcarroll , Thank you for raising this issue with grouped datasets. We also have examples of such quirky grouped datasets, such AVIRIS-3 L2A. I understand that rewriting the files to move the coordinate variables to the root will be not an option for many cases. The second option - "changing DataTree" - is also not trivial, because netCDF4 allows the same variable name to appear in different groups. Building on your example, another variable We do encourage the data providers to use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The DataTree design treats inheritance a bit differently than netCDF4, so of course we can find tons of "quirky" NASA Earthdata that does not work as well as we would like with DataTree! I'm wondering aloud on the best path forward for one particular but common case, and hoping for any input.
Here's a thing you can do (and is done, e.g. dimension "wavelength_3d" in these netCDF4s) in a netCDF4 file:
In this file, the variable "y" in group "a" has the same dimension as the coordinate variable "x" in group "b". We know it is the same dimension because dimensions are inherited in netCDF4 and the "x" dimension was defined at a common ancestor.
DataTree design includes coordinate inheritance. So according to DataTree, the variable "y" in group "a" has no coordinates or index. This is the quirk, common in many real netCDF4s, that I am seeking to smooth out.
Right now, I'm working around this quirk by manually assigning coordinates; like this:
I have no idea if this copies data (hope not!), but the main difficulty is you have to know where to find each variable's coordinates.
Unless I'm missing something, a "fix" could be pursued as a change to DataTree or as a re-write the netCDF4 files.
Is either change worth pursuing?
Beta Was this translation helpful? Give feedback.
All reactions