<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">Hi Cory,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">I had put OutputType on Image, and afterwards added the Programmable Filter.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><img width="569" height="402" id="Picture_x0020_7" src="cid:image001.jpg@01D3E309.EDDDC020" alt="cid:image001.jpg@01D3E309.A2F59290"></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">This is what I roughly expect to see (shown is the PointData):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><img width="766" height="502" id="Picture_x0020_6" src="cid:image002.jpg@01D3E309.EDDDC020" alt="cid:image002.jpg@01D3E309.A2F59290"></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">But this is what I get as CellData:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><img width="768" height="499" id="Picture_x0020_5" src="cid:image003.jpg@01D3E309.EDDDC020" alt="cid:image003.jpg@01D3E309.A2F59290"></span><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">I have had similar issues like this before with CellData. I will try at my home computer whether it works there (see if it is not a bad installation I have)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">Note: I run Paraview on Windows 7, I have Windows 10 at home.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Cory Quammen [mailto:cory.quammen@kitware.com]
<br>
<b>Sent:</b> Thursday, May 03, 2018 5:50 PM<br>
<b>To:</b> Engelen, J. van (Joeri)<br>
<b>Cc:</b> Moreland, Kenneth; paraview@public.kitware.com<br>
<b>Subject:</b> Re: [Paraview] generic NetCDFreader support for CellData<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Joeri,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">On Thu, May 3, 2018 at 11:37 AM Engelen, J. van (Joeri) <<a href="mailto:j.vanengelen1@uu.nl">j.vanengelen1@uu.nl</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">Thank you Cory,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">That indeed worked on the toy example, but when I tried it on my full dataset (uploaded here as well)
 Paraview v5.4.1 had trouble rendering it (only rendered part of the outer sides, when activating coloring).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">I think it is not the script now giving issues, but the renderer. As I experience similar issues previously
 with celldata loaded from a .VTR file (I assumed that that file was corrupted). </span>
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">It seems to me that when you go beyond a certain amount of cells, Paraview does not render its output
 properly.</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">ParaView is regularly used to render data much larger than your full example, which is around 6 million cells, so unless you are running out of RAM on your graphics card, I don't think that is it.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I suspect the problem is that the full data is by default read as a Rectilinear Grid instead of a Image (Uniform Rectilinear Grid). Did you remember to change the Output Type to "Image"? Do that, then create a Programmable Filter with the
 script. It works for me:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><img border="0" width="530" height="562" id="_x0000_i1025" src="cid:image004.png@01D3E309.EDDDC020" alt="image.png"><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">You might be running into a bug with the Programmable Filter that occurs when the output data type of its input changes. If you change the Output Type to "Image", make sure you add a new Programmable Filter after applying your change, otherwise
 you may run into this bug.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">HTH,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cory<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">Could you test whether it works for you on v5.5?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">I uploaded my full dataset here:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"><a href="https://coeri.stackstorage.com/s/ztga1yLO8mjD1EO" target="_blank">https://coeri.stackstorage.com/s/ztga1yLO8mjD1EO</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">To visualize data properly:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D">Put a threshold filter and filter out 0.0 (as that is NoData) by putting minimum on 0.5, furthermore
 stretch the z direction by a factor 3000.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Cory
 Quammen [mailto:<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>]
<br>
<b>Sent:</b> Thursday, May 03, 2018 4:13 PM<br>
<b>To:</b> Engelen, J. van (Joeri)<br>
<b>Cc:</b> Moreland, Kenneth; <a href="mailto:paraview@public.kitware.com" target="_blank">
paraview@public.kitware.com</a><br>
<b>Subject:</b> Re: [Paraview] generic NetCDFreader support for CellData</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Indeed, my original script is not quite right. Here is a more robust version that should copy all point data arrays to cell data arrays:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<pre style="margin-top:9.0pt"><span style="font-family:"Times New Roman","serif"">dims <span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>GetDimensions()</span><o:p></o:p></pre>
<pre><span style="font-family:"Times New Roman","serif"">ext <span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>GetExtent()</span><o:p></o:p></pre>
<pre><span style="font-family:"Times New Roman","serif"">output<span style="color:#666666">.</span>SetDimensions(dims[<span style="color:#666666">0</span>]<span style="color:#666666">+1</span>, dims[<span style="color:#666666">1</span>]<span style="color:#666666">+1</span>, dims[<span style="color:#666666">2</span>]<span style="color:#666666">+1</span>)</span><o:p></o:p></pre>
<pre><span style="font-family:"Times New Roman","serif"">output<span style="color:#666666">.</span>SetExtent(ext[<span style="color:#666666">0</span>], ext[<span style="color:#666666">1</span>]<span style="color:#666666">+1</span>, ext[<span style="color:#666666">2</span>], ext[<span style="color:#666666">3</span>]<span style="color:#666666">+1</span>, ext[<span style="color:#666666">4</span>], ext[<span style="color:#666666">5</span>]<span style="color:#666666">+1</span>)</span><o:p></o:p></pre>
<pre><span style="font-family:"Times New Roman","serif"">inputPd <span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>PointData</span><o:p></o:p></pre>
<pre><span style="font-family:"Times New Roman","serif"">outputCd <span style="color:#666666">=</span> output<span style="color:#666666">.</span>CellData</span><o:p></o:p></pre>
<pre><b><span style="font-family:"Times New Roman","serif";color:green">for</span></b><span style="font-family:"Times New Roman","serif""> array <b><span style="color:#AA22FF">in</span></b> inputPd:</span><o:p></o:p></pre>
<pre><span style="font-family:"Times New Roman","serif"">  <b><span style="color:green">print</span></b>(<span style="color:green">type</span>(array))</span><o:p></o:p></pre>
<pre style="margin-bottom:9.0pt"><span style="font-family:"Times New Roman","serif"">  outputCd<span style="color:#666666">.</span>append(array, array<span style="color:#666666">.</span>GetName()) </span><o:p></o:p></pre>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I hope that does it. It works in my ParaView 5.5 with the sample data you provided (thank you for providing that!).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cory<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Thu, May 3, 2018 at 7:48 AM Engelen, J. van (Joeri) <<a href="mailto:j.vanengelen1@uu.nl" target="_blank">j.vanengelen1@uu.nl</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D">Thanks everybody for the support,
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D">I followed Ken’s suggestion, which will simplify things, however when I put Cory’s original script in the programmable
 filter no Data Array can be found in the output. So I sense there is a (small) bug in the script?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D">I tried changing the last three lines to the oneliner
</span><span style="font-family:"Courier New"">output<span style="color:#666666">.</span>GetCellData()<span style="color:#666666">.</span>SetScalars(inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>GetPointData()<span style="color:#666666">.</span>GetScalars())</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D">But that did not help.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D">I have uploaded a small subset of my data here for you to toy around with
<a href="https://coeri.stackstorage.com/s/0vUfQkVyv2MD3Ml" target="_blank">https://coeri.stackstorage.com/s/0vUfQkVyv2MD3Ml</a>. (Note: It helps for visualization to stretch the z-axis by a factor 3000).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D">This perhaps helps you with helping me.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Moreland,
 Kenneth [mailto:<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>]
<br>
<b>Sent:</b> Wednesday, May 02, 2018 7:27 PM<br>
<b>To:</b> Quammen, Cory (External Contacts); Engelen, J. van (Joeri)<br>
<b>Cc:</b> <a href="mailto:paraview@public.kitware.com" target="_blank">paraview@public.kitware.com</a><br>
<b>Subject:</b> Re: [Paraview] generic NetCDFreader support for CellData</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">The NetCDF Generic/CF reader has an option named “Output Type” that you can use to force the output to a vtkImageData. Then Cory’s original programmable filter
 will work, and you won’t have to deal with the coordinates.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">-Ken</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<b><span lang="EN-US" style="color:black">From: </span></b><span lang="EN-US" style="color:black">ParaView <<a href="mailto:paraview-bounces@public.kitware.com" target="_blank">paraview-bounces@public.kitware.com</a>> on behalf of Cory Quammen <<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>><br>
<b>Date: </b>Wednesday, May 2, 2018 at 11:19 AM<br>
<b>To: </b>"<a href="mailto:j.vanengelen1@uu.nl" target="_blank">j.vanengelen1@uu.nl</a>" <<a href="mailto:j.vanengelen1@uu.nl" target="_blank">j.vanengelen1@uu.nl</a>><br>
<b>Cc: </b>"<a href="mailto:paraview@public.kitware.com" target="_blank">paraview@public.kitware.com</a>" <<a href="mailto:paraview@public.kitware.com" target="_blank">paraview@public.kitware.com</a>><br>
<b>Subject: </b>[EXTERNAL] Re: [Paraview] generic NetCDFreader support for CellData</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<a name="m_198876762357081960_m_14264757983942129"><span lang="EN-US">On Wed, May 2, 2018 at 11:37 AM Engelen, J. van (Joeri) <</span></a><a href="mailto:j.vanengelen1@uu.nl" target="_blank"><span lang="EN-US">j.vanengelen1@uu.nl</span></a><span lang="EN-US">>
 wrote:</span><o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif";color:#1F497D">Thank you Cory,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif";color:#1F497D">I sense this solution might work. However, the type of my data is “Rectilinear Grid”, not sure if that increases the complexity (dx = 1000, dy = 1000, dz = 1).</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Ah. From the documentation: "</span><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black;background:white">To define a </span><a href="https://www.vtk.org/doc/nightly/html/classvtkRectilinearGrid.html" target="_blank" title="a dataset that is topologically regular with variable spacing in the three coordinate directions ..."><b><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:#4665A2;background:white;text-decoration:none">vtkRectilinearGrid</span></b></a><span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black;background:white">,
 you must specify the dimensions of the data and provide three arrays of values specifying the coordinates along the x-y-z axes". It should be a similar script, but you'd have to add an additional X, Y, and Z position at the end of those coordinate arrays.
 So your script would look more like:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US" style="font-size:10.5pt;color:black">dims </span><span lang="EN-US" style="font-size:10.5pt;color:#666666">=</span><span lang="EN-US" style="font-size:10.5pt;color:black"> inputs[</span><span lang="EN-US" style="font-size:10.5pt;color:#666666">0</span><span lang="EN-US" style="font-size:10.5pt;color:black">]</span><span lang="EN-US" style="font-size:10.5pt;color:#666666">.</span><span lang="EN-US" style="font-size:10.5pt;color:black">GetDimensions()</span><o:p></o:p></p>
</div>
<div>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">ext </span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">=</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetExtent()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">output.SetDimensions(dims[0]+1, dims[1]+1, dims[2]+1)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">output</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">SetExtent(ext[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">], ext[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">1</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">+1</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">, ext[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">2</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">], ext[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">3</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">+1</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">, ext[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">4</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">], ext[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">5</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">+1</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">inputPd </span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">=</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetPointData()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">outputCd </span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">=</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> output</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetCellData()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">outputCd</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">SetScalars(inputPd</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetScalars())</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> </span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><i><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#408080;background:white"># Set coordinates</span></i><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">xCoords </span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">=</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetXCoordinates()</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">NewInstance()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">xCoords</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">DeepCopy(inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetXCoordinates())</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">xCoords</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">InsertNextValue(</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">1.0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">) # Should a reasonable x value for your dataset larger than previous max x</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">output</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">SetXCoordinates(xCoords)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> </span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">yCoords </span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">=</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetYCoordinates()</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">NewInstance()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">yCoords</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">DeepCopy(inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetYCoordinates())</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">yCoords</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">InsertNextValue(</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">1.5</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">) </span><span lang="EN-US" style="font-family:"Times New Roman","serif";background:white"># Should be a reasonable like the x coordinate</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="color:black;background:white">output</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">SetYCoordinates(yCoords)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> </span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">zCoords </span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">=</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetZCoordinates()</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">NewInstance()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">zCoords</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">DeepCopy(inputs[</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">]</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">GetZCoordinates())</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">zCoords</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">InsertNextValue(</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">1.0</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">) </span><span lang="EN-US" style="color:black;background:white"># Should be a reasonable like the z coordinate</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">output</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:#666666;background:white">.</span><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white">SetZCoordinates(zCoords)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span lang="EN-US" style="font-family:"Times New Roman","serif";color:black;background:white"> </span><o:p></o:p></pre>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black;background:white">Some extent information also needs to be supplied, but I'm not entirely clear on how to do that correctly.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">A better solution would be to add an option to the reader to take care of this for you if that is reasonable for your data.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">Best,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US" style="font-size:10.5pt;font-family:"Arial","sans-serif";color:black">Cory</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif";color:#1F497D">Regardless, the script you provided does not give me output and it also does not throw an error, so I’m left a bit in the dark here.</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Cory Quammen [mailto:</span><a href="mailto:cory.quammen@kitware.com" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">cory.quammen@kitware.com</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">]
<br>
<b>Sent:</b> Wednesday, May 02, 2018 5:01 PM<br>
<b>To:</b> Engelen, J. van (Joeri)<br>
<b>Cc:</b> </span><a href="mailto:paraview@public.kitware.com" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">paraview@public.kitware.com</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
<b>Subject:</b> Re: [Paraview] generic NetCDFreader support for CellData</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
Joeri,<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
You can try the "Point Data to Cell Data" filter, but that averages the point data and places the results in the cell data. You may wind up with some incorrect values using that approach.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
Better would be to use a "Progammable Filter" to resize the cartesian grid read by the NetCDF reader and treat the point data as cell data. That is a bit involved, but not terrible. Set the Script to<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
</div>
<div>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">dims <span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>GetDimensions()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">ext <span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>GetExtent()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">output<span style="color:#666666">.</span>SetDimensions(dims[<span style="color:#666666">0</span>]<span style="color:#666666">+1</span>, dims[<span style="color:#666666">1</span>]<span style="color:#666666">+1</span>, dims[<span style="color:#666666">2</span>]<span style="color:#666666">+1</span>)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">output<span style="color:#666666">.</span>SetExtent(ext[<span style="color:#666666">0</span>], ext[<span style="color:#666666">1</span>]<span style="color:#666666">+1</span>, ext[<span style="color:#666666">2</span>], ext[<span style="color:#666666">3</span>]<span style="color:#666666">+1</span>, ext[<span style="color:#666666">4</span>], ext[<span style="color:#666666">5</span>]<span style="color:#666666">+1</span>)</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">inputPd <span style="color:#666666">=</span> inputs[<span style="color:#666666">0</span>]<span style="color:#666666">.</span>GetPointData()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">outputCd <span style="color:#666666">=</span> output<span style="color:#666666">.</span>GetCellData()</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif"">outputCd<span style="color:#666666">.</span>SetScalars(inputPd<span style="color:#666666">.</span>GetScalars())</span><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><span style="font-family:"Times New Roman","serif""> </span><o:p></o:p></pre>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
This assumes that the NetCDF reader is producing a vtkImageData (you can check under the Information panel) which would report the Type: of the data set as "Image (Uniform Rectilinear Grid).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
HTH,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
Cory<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
On Wed, May 2, 2018 at 10:17 AM Engelen, J. van (Joeri) <<a href="mailto:j.vanengelen1@uu.nl" target="_blank">j.vanengelen1@uu.nl</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">Hi,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">I was wondering whether it is possible to read NetCDF files as CellData.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">I have categorial data on Cartesian coordinates that I want to visualize. To be more specific, the data represents lithologies of the subsurface. So 1 = sand, 3 = clay, 5 = rock.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">The problem is that my file is automatically interpreted as PointData. To render this PointData, Paraview than consequently interpolates to achieve cell values.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">With most variables that is not such a problem, but here it is. If I have sand (1) overlying rock (5), Paraview shows me clay (3).
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">Also, the information available to me was ambiguous,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">-this source says it is probably not possible:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<a href="https://public.kitware.com/pipermail/paraview/2017-September/040984.html" target="_blank"><span style="font-family:"Arial","sans-serif"">https://public.kitware.com/pipermail/paraview/2017-September/040984.html</span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">-this states it is possible return Cell Data information:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<a href="https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.simple.NetCDFReader.html" target="_blank"><span style="font-family:"Arial","sans-serif"">https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.simple.NetCDFReader.html</span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">I tried converting my data from NetCDF to a .vtr file in Python, but this resulted in more problems than solutions. (Just gave me very glitched rendering).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">So I have two questions:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">-Is this possible?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">-Are there any workarounds you can think of to get my data as CellData in Paraview?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">I’m using Paraview v5.4.1 on Windows 7.
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span style="font-family:"Arial","sans-serif"">Kind regards,<br>
Joeri</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
_______________________________________________<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>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" target="_blank">https://public.kitware.com/mailman/listinfo/paraview</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
 <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"><br clear="all">
</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">-- </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">--
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>