<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Paraview] trouble reading in netCDF file</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Well, typing ncdump -h file, I get (note last line):<BR>
// global attributes:<BR>
:title = "Scotia Fundy Maine (Tidal Power) case " ;<BR>
:institution = "School for Marine Science and Technology" ;<BR>
:source = "FVCOM_2.6" ;<BR>
:history = "model started at: 25/02/2010 18:29" ;<BR>
:references = "<A HREF="http://fvcom.smast.umassd.edu">http://fvcom.smast.umassd.edu</A>, <A HREF="http://codfish.smast.umassd.edu">http://codfish.smast.umassd.edu</A>" ;<BR>
:Conventions = "CF-1.0" ;<BR>
<BR>
Which file(s) do I edit to create my own reader? The new model I will be getting outputs netCDF-4 files. Can I import unstructured netCDF-4 files into paraview with an HDF5 reader? <BR>
<BR>
thanks!<BR>
Joel<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Moreland, Kenneth [<A HREF="mailto:kmorel@sandia.gov">mailto:kmorel@sandia.gov</A>]<BR>
Sent: Mon 4/19/2010 5:20 PM<BR>
To: Joel Culina; paraview@paraview.org<BR>
Subject: Re: [Paraview] trouble reading in netCDF file<BR>
<BR>
I don't really understand this description, but I can say with confidence that the netCDF reader will not read this convention. The CF convention does not support unstructured triangular grids (or any unstructured grids, for that matter). The (general) netCDF reader knows how to read 1-, 2-, and 3-D arrays as regular grids with some conventions on setting coordinates to the points in the grid.<BR>
<BR>
NetCDF is not a data format description. It is simply an I/O library that specifies how to read/write arrays with some annotation. Thus, if you have data in a netCDF file that has a structure more complicated than simple arrays, you will have to create a reader that understands how to construct the data format. From your description, it sounds like you will have to create your own reader.<BR>
<BR>
-Ken<BR>
<BR>
On 4/16/10 4:05 PM, "Joel Culina" <joel.culina@acadiau.ca> wrote:<BR>
<BR>
Hi,<BR>
<BR>
Thanks Ken.<BR>
<BR>
I'm using 3.8 now, but am have some similar troubles. To recap: I'm using unstructured triangular grid. The 'dimensions' variables include integer identifiers for triangle nodes, but NOT lat,long and depth. Rather, these are included among the 'variables' variables (e.g. lat = lat(node)).<BR>
<BR>
Paraview is reading in the data correctly. But I need it to use the 'variable' variables lat, long, and depth to serve as the coordinates of the grid. All other 'variables' variables are of course functions of the 'dimensions' variables only, but are to be plotted over the 3D space determined by lat, long and depth.<BR>
<BR>
Can this be done in Paraview?<BR>
<BR>
thanks<BR>
Joel<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Moreland, Kenneth [<A HREF="mailto:kmorel@sandia.gov">mailto:kmorel@sandia.gov</A>]<BR>
Sent: Wed 4/7/2010 11:09 AM<BR>
To: Joel Culina; paraview@paraview.org<BR>
Subject: Re: [Paraview] trouble reading in netCDF file<BR>
<BR>
The netCDF reader in version understands the COARDS convention (a common subset of CF). It sounds like the variable annotation you describe should be supported. However, one major limitation of the netCDF reader is that it only supports reading variables of the same dimensions because it puts them all on the same grid. So if you have selected to load variables with different dimensions, it will use the dimensions of the first variable and fail to load the rest. That would explain the behavior you are getting since most netCDF files I have run into seem to have variables with low dimension listed first. (There is no particular reason for this. It just seems to be what people/applications do.) If this is the case, you are probably also getting a lot of warnings from the netCDF reader about it and the Information panel will be missing many of your variables. Try turning off all variables in the Object Inspector and turning on only one variable you are interested in.<BR>
<BR>
If this is the problem, it should go away in version 3.8. Realizing this the 3.6 interface to the netCDF reader really sucks, I changed it to select dimensions instead of variables. All variables conforming to the selected dimensions are loaded. It makes using the netCDF reader much easier and problems like the one I described go away. I also expanded the reader to understand most of the CF convention.<BR>
<BR>
Unfortunately, don't use the CVS for this just yet. I have recently discovered that a new netCDF reader that was apparently built for a specific use case but seems to screw up on most data was added to ParaView and it is overriding the existing netCDF reader. We are trying to work on a resolution.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 4/6/10 6:02 PM, "Joel Culina" <joel.culina@acadiau.ca> wrote:<BR>
<BR>
Hi,<BR>
<BR>
Thank you Ken for responding.<BR>
<BR>
I suspect that your diagnosis is correct; the root of the problem, I believe, is that I am reading in netCDF data that follows the CF convention. In particular, the grid is an unstructured triangular 2D grid ('poly data' grid in the venacular of paraview). The 'dimensions' variables include integer identifiers for triangle nodes, but NOT lat, long, x, y, time etc. Rather, these are included among the 'variables' variables (e.g. lat = lat(node)).<BR>
<BR>
Is the problem indeed that the paraview netCDF reader cannot understand this particular netCDF-CF file? Is there a way around this, without having to change the way the data is outputted (from netCDF-CF to netCDF-COARDS convention)? Note that I can read into paraview certain variables by filtering out the 1-dimensional variables (lat, long etc.), but of course these variables do not have the correct dependencies (they should be dependent on the variables I filtered out - lat, long etc.)<BR>
<BR>
thanks,<BR>
Joel<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Moreland, Kenneth [<A HREF="mailto:kmorel@sandia.gov">mailto:kmorel@sandia.gov</A>]<BR>
Sent: Tue 4/6/2010 3:41 PM<BR>
To: Joel Culina; paraview@paraview.org<BR>
Subject: Re: [Paraview] trouble reading in netCDF file<BR>
<BR>
It sounds like you are reading in an array with 0 or 1 dimensions (not including time). Although the reader should happily create an image data of that structure, the standard rendering views only understand image data of 2 or 3 dimensions. Hence you get the error.<BR>
<BR>
If you want to see the data in a plot, try adding the "Plot Data" filter.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 4/6/10 11:36 AM, "Joel Culina" <joel.culina@acadiau.ca> wrote:<BR>
<BR>
<BR>
<BR>
Hi,<BR>
<BR>
I am trying to read in a netCDF file using Paraview 3.6.2. It can 'see' the netCDF file, but when I attempt to read in the file by pressing 'Apply', I get the following error message:<BR>
<BR>
ERROR: In /home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3/Servers/Filters/vtkTexturePainter.cxx, line 280<BR>
vtkTexturePainter (0xb8a0000): Incorrect dimensionality.<BR>
<BR>
I'm not sure which netCDF release created the netCDF file. However, I read in a previous post that paraview 3.6.1 could handle netCDF 4, and since "all netCDF files ever written can always be read by the latest netCDF release. That is, we guarantee backward data compatibility" then 3.6.2 should be able to handle my netCDF file (which wasn't created too recently).<BR>
<BR>
I can read the netCDF file into MATLAB, so it isn't corrupt.<BR>
<BR>
So what's the problem?<BR>
<BR>
thanks<BR>
Joel<BR>
<BR>
<BR>
<BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
***********<BR>
*** *** *** email: kmorel@sandia.gov<BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <A HREF="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</A><BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
***********<BR>
*** *** *** email: kmorel@sandia.gov<BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <A HREF="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</A><BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
***********<BR>
*** *** *** email: kmorel@sandia.gov<BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <A HREF="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</A><BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>