Closed brugger1 closed 3 years ago
Is the question about whether the netCDF API supports doing this or whether one of the flavors of the uber-netCDF plugin can do it?
If the 4th dimension is time (or in netCDF parlance the unlimited dimension), then yes, that is the natural modality of access for netCDF and our plugins likely also handle that. Otherwise, read on...
If the netCDF file is an HDF5 file (newer versions of netCDF can use HDF5 under the covers), then yes, obviously, it is possible by going direct through the HDF5 API.
The question is whether our generic netcdf reader handles it. I know the BOUT reader handles 4d arrays with one of the dimensions being time just as you mentioned.
The code at our around this line in avtBasicNETCDFReader.C
suggest no...we handle only up to 3 spatial dimensions...
It looks like the first dimension in this variable is a laser. He also would like the ability to plot variables of X-dimension. Is there a reason that the reader currently doesn't handle higher dimension variables (tensors, arrays, etc.)?
It looks like the first dimension in this variable is a laser.
Well, then maybe our notion of multi-block would work where each laser is one block of a multi-block object???
He also would like the ability to plot variables of X-dimension. Is there a reason that the reader currently doesn't handle higher dimension variables (tensors, arrays, etc.)?
We have to be careful where in the variable's domain (spatial or topological dimension) or range (tensor rank or sometimes also called dimension) we are talking about dimension. The original inquiry here I took to mean one about the variable's domain dimensions. However, as you are alluding to, often the extra dimension (above 3) is used to deal with the 3 components of a vector, or the 9 components of a tensor, or maybe the 256 angles of a flux. And, yes, I agree, in those cases, it would be good for the plugin to be able to load them up correctly. The challenge is in informing VisIt how to do that. Perhaps we could add database read options that would permit a user to indicate the role (domain dimension or tensor-rank) of a netCDF dimension in the file and this could then help inform the bootstrap to tease metadata out of the file. Maybe even something as simple as given a list of netCDF dimension names, indicating whether a dimension applies to variable domains or their tensor ranks.
Our basic reader is pretty basic and our solution has been to create domain- or application-specific sub-classes of that reader for cases like this.
I had a user call that has netcdf files. He has a 4d array in it and would like to pull out a 3d block from it. Is there any way to do this?