<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>
<div>The reader that is being used is vtkNetCDFCFReader. It is defined in ParaView/Servers/ServerManager/Resources/readers.xml, although it is not obvious.</div>
<div><font size="2"><font face="Consolas,Courier New,Courier"><span style="font-size:10pt"><br>
</span></font></font></div>
<div><font size="2"><font face="Consolas,Courier New,Courier"><span style="font-size:10pt"><span class="Apple-style-span" style="font-size: 14px; font-family: Calibri, sans-serif; ">
<div>As the name implies, this reader reads netCDF files using the CF convention. (As the default netCDF reader, it also gracefully handles files that do not follow this convention.) With this assumption, I will try to explain what it does. It reads arrays
as regular 1, 2, or 3D arrays, possibly with time. The CF convention also provides a means to assign coordinates to each grid point and to identify the coordinates as longitude or latitude.</div>
<div><br>
</div>
<div>Even though coordinates are defined as longitude and latitude, the topology of the grid itself is still a grid. Thus, the grid gets wrapped around, but still has these seems that you see because topologically the one end of the regular grid is not attached
to the other. I can't think of any filter that will identify and close these seems. In fact, it's not straightforward to do at all. If you look at your topology, it is not lain out on a simple spherical grid.</div>
<div><br>
</div>
<div>The "right" way to solve your problem, which may or may not be in your control, is to create netCDF files that specify cell boundaries for a closed topology. Your netCDF file must be following at least some parts of the CF convention; your data would
not show up as a sphere if it were not. The CF convention provides a way of defining cells that are not constrained by a regular grid topology. It is done through a "bounds" attribute on the dimension descriptor variables. You need either 1D or 2D bounds.
They are described in this section of the CF convention documentation: <a href="http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/cf-conventions.html#cell-boundaries">http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.5/cf-conventions.html#cell-boundaries</a>.</div>
<div><br>
</div>
<div>The VTK test data has examples of both 1D bounds (tos_O1_2001-2002.nc) and 2D bounds (sampleCurveGrid4.nc). You can get the VTK test data from git (<a href="http://vtk.org/VTKData.git">http://vtk.org/VTKData.git</a>), or download them directly from the
gitourious server:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px;">
<div><a href="http://vtk.org/gitweb?p=VTKData.git;a=blob;f=Data/tos_O1_2001-2002.nc;h=30aa4a9b5e08b9bdf64540f2b144d83b279cca6c;hb=HEAD">http://vtk.org/gitweb?p=VTKData.git;a=blob;f=Data/tos_O1_2001-2002.nc;h=30aa4a9b5e08b9bdf64540f2b144d83b279cca6c;hb=HEAD</a></div>
<div><br>
</div>
<div><a href="http://vtk.org/gitweb?p=VTKData.git;a=blob;f=Data/sampleCurveGrid4.nc;h=0ab89c27a25f92c047b58dca8b3057ca8d4df017;hb=HEAD">http://vtk.org/gitweb?p=VTKData.git;a=blob;f=Data/sampleCurveGrid4.nc;h=0ab89c27a25f92c047b58dca8b3057ca8d4df017;hb=HEAD</a></div>
</blockquote>
<div><br>
</div>
<div>-Ken</div>
</span></span></font></font></div>
<div><font size="2"><font face="Consolas,Courier New,Courier"><span style="font-size:10pt"><br>
**** Kenneth Moreland<br>
*** Sandia National Laboratories<br>
*********** <br>
*** *** *** email: <font color="#0000FF"><u><a href="kmorel@sandia.gov">kmorel@sandia.gov</a><br>
</u></font>** *** ** phone: (505) 844-8919<br>
*** web: <font color="#0000FF"><u><a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a></u></font><br>
</span></font></font></div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Simon Su <<a href="mailto:newsgroup4ssu@gmail.com">newsgroup4ssu@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Fri, 18 Mar 2011 16:43:42 -0400<br>
<span style="font-weight:bold">To: </span>Andy Bauer <<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>><br>
<span style="font-weight:bold">Cc: </span><<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Paraview] loading nc formatted data<br>
</div>
<div><br>
</div>
Hi Andy,<br>
<br>
python trace gave me<br>
<br>
<span dir="ltr" id=":28o"></span><style type="text/css">p, li { white-space: pre-wrap; }</style>
<table style="margin: 4px;">
<tbody>
<tr>
<td style="border: medium none ;">
<p style="margin: 0px; text-indent: 0px;">zos_Omon_GFDLESM2M_historical_r1i1p1_186101188012_nc = NetCDFReader( FileName=['/work/sms/data/cmor-20110128/mon/ocean/zos/r1i1p1/zos_Omon_GFDL-ESM2M_historical_r1i1p1_186101-188012.nc'] )</p>
</td>
</tr>
</tbody>
</table>
<br>
and there are tons of netcdf reader in ParaView and it is not in the plugin directory<br>
<br>
sms:/local/home/build/paraview/ParaView-3.10.0/Plugins> pwd<br>
/local/home/build/paraview/ParaView-3.10.0/Plugins<br>
sms:/local/home/build/paraview/ParaView-3.10.0/Plugins> ll<br>
total 84<br>
drwxr-xr-x 3 sms t 4096 Mar 10 12:37 AdiosReader/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 AnalyzeNIfTIReaderWriter/<br>
-rw-r--r-- 1 sms t 3261 Mar 9 13:31 CMakeLists.txt<br>
drwxr-xr-x 3 sms t 4096 Mar 10 12:37 CoProcessingScriptGenerator/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 CosmoFilters/<br>
drwxr-xr-x 4 sms t 4096 Mar 10 12:37 EyeDomeLighting/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 ForceTime/<br>
drwxr-xr-x 3 sms t 4096 Mar 10 12:37 H5PartReader/<br>
drwxr-xr-x 4 sms t 4096 Mar 10 12:37 Manta/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 Moments/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 NetDMFReader/<br>
drwxr-xr-x 6 sms t 4096 Mar 10 12:37 PointSprite/<br>
drwxr-xr-x 4 sms t 4096 Mar 10 12:37 PrismPlugins/<br>
drwxr-xr-x 3 sms t 4096 Mar 10 12:37 pvblot/<br>
drwxr-xr-x 3 sms t 4096 Mar 10 12:37 SierraPlotTools/<br>
drwxr-xr-x 3 sms t 4096 Mar 10 12:37 SLACTools/<br>
drwxr-xr-x 4 sms t 4096 Mar 10 12:37 StreamingView/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 SurfaceLIC/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 Vapor/<br>
drwxr-xr-x 2 sms t 4096 Mar 10 12:37 VRPN/<br>
drwxr-xr-x 2 sms t 4096 Mar 9 13:31 VRUI/<br>
sms:/local/home/build/paraview/ParaView-3.10.0/Plugins> <br>
<br>
<br>
Can you help describe how Netcdf files plugins are done in ParaView. Do they have a super class of Netcdf that they all derive from to write the different flavors of netcdf readers? If so, where can the code be found?<br>
<br>
thanks<br>
-simon<br>
<br>
<br>
<br>
<div class="gmail_quote">On Fri, Mar 18, 2011 at 10:30 AM, Andy Bauer <span dir="ltr">
<<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Simon,<br>
<br>
Replies below...<br>
<br>
<div class="gmail_quote">
<div class="im">On Thu, Mar 17, 2011 at 12:41 PM, Simon Su <span dir="ltr"><<a href="mailto:newsgroup4ssu@gmail.com" target="_blank">newsgroup4ssu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br>
<br>
<a href="ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/1.png" target="_blank">ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/1.png</a><br>
<a href="ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/2.png" target="_blank">ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/2.png</a><br>
<a href="ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/3.png" target="_blank">ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/3.png</a><br>
<br>
the above are screen shot from older version of *.nc files that I have that I loaded up with Paraview 3.10.0 64-bit which I compiled myself. As you can see, the grid is correctly loaded. But in the data, there is a crack. Is there a filter that can fix this
in ParaView? :)<br>
</blockquote>
</div>
<div><br>
I'm not aware of any filter that will fix this automatically. Can you describe the grid a bit more? It kind of looks like a multiblock of structured grids.<br>
</div>
<div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<a href="ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/4.png" target="_blank">ftp://ftp.gfdl.noaa.gov/pub/sms/4ParaView/4.png</a> is the latest nc file that I have of similar simulation preprocessed output. When I loaded it up, it is clearly doing making assumption
on the grid that is not correct and hence, the double looking grid. <br>
<br>
The questions now are:<br>
<br>
1. ParaView has lots of *.nc file loader. How do I know which loader is ParaView using to load the data? If I pick a type for the Files of type option in the open File window, will that gurantees that ParaView will be using that particular file loader?<br>
</blockquote>
</div>
<div><br>
If there is an ambiguity for which file loader to use (i.e. multiple readers assume the same extension), then the GUI should pop up a dialog for you to specify which one to use. You can use the python trace to figure out exactly what reader is being used to
load the file.<br>
<br>
</div>
<div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
2. If I know which loader is used, I would like to see if I can modify the existing loader to create a new type of *.nc file loader to fix the grid of my data. Where is the code in the source tree of ParaView is the loader plugin placed?
<br>
</blockquote>
</div>
<div>Based on the name of the name of the reader from the python script, you can look up the actual class name in the ParaView/Servers/ServerManager/Resources/readers.xml file.
<br>
</div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
or if there is an easier solution to fix my grid problem that doesn't involve developing a new data loader plugin that would be better.... :) please let me know...<br>
<br>
thanks<br>
<font color="#888888">-simon<br>
<br>
</font><br>
</div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a> Please keep messages on-topic and check the ParaView Wiki at:
<a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a> Follow this link to subscribe/unsubscribe:
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a>
</span>
</body>
</html>