Hej,
I have a problem visualising netcdf grids where the coordinate vectors have the same lengths.The file is loaded with the NetCDFReader. When I annotate the coordinates with Data Axes Grid the x-coordinates are equal to the y-coordinates. In the file itself I find the correct coordinates and reading and plotting the data in octave displays them correctly. If I delete a row or column from the matrix and shorten the respective vector, ParaView displays the coordinates correctly as expected.
Is this a bug or am I missing some sort of keyword in the file generation?
Can you be more specific about what is not working?
That said, the use of the same dimension multiple times in a variable is definitely not something I considered when creating the initial netCDF reader. I don’t think it ever occurred to me that someone would do that. I went and reviewed the netCDF CF convention specification (which the reader is based on) to see what it says. There is some room for interpretation, but looks like this concept is disallowed:
A variable may have any number of dimensions, including zero, and the dimensions must all have different names.
(Emphasis mine.) The document continues saying that even if you have two dimensions with the same unit, they should have different names.
All that said, whether or not using the same dimension multiple times on a variable works, it is probably best practice to always use different dimensions with different names.
Hi Kenneth,
Thanks for your answer. Now that you point it out, I found the source of my problem in the file generation - which assigned the dimension (y,y) to the grid if x and y have the same length. Easy to understand why Paraview would then assign the y coordinates also to the x-axes… Obviously my plotting routine in octave makes some assumptions itself regarding the dimensions of grid data. Another thing I should correct.
Thanks again!