<div dir="ltr">I think you need inputdesc1 = datadescription.GetInputDescriptionByName("input") and datadescription.AddInput("input1") before you do cpscript.RequestDataDescription(datadescription).</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 20, 2015 at 4:15 PM, <span dir="ltr"><<a href="mailto:u.utku.turuncoglu@be.itu.edu.tr" target="_blank">u.utku.turuncoglu@be.itu.edu.tr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am tying to run a ParaView pipeline that uses a dataset. In this case,<br>
the dataset has both three (time,y,x) and four (time,z,y,x) dimensional<br>
fields. In the pipeline, i am loading the same dataset twice (by changing<br>
dimensions in the properties window) to access different variables because<br>
i am using both 3 and 4 dimensional fields together to create final<br>
visualisation. Until, this point everything is fine and it works.<br>
<br>
Then, i am using co-processing plugin to export pipeline as Python script<br>
and wrote a driver to trigger visualisation pipeline (in Python). If i use<br>
only fields with 3 (or 4) dimension, then attached driver script works<br>
without any problem (driver_00.py) but if i use both 3 and 4 dimensional<br>
fields then i need to send two different dataset to DoCoProcessing routine<br>
but i could not make it work. I tried to create two different readers like<br>
following<br>
<br>
# read datasets<br>
reader1 = pvsimple.NetCDFReader(FileName=sys.argv[2])<br>
reader1.Dimensions = '(zlev, iy, jx)'<br>
reader1.SphericalCoordinates = False<br>
reader2 = pvsimple.NetCDFReader(FileName=sys.argv[3])<br>
reader2.Dimensions = '(iy, jx)'<br>
reader2.SphericalCoordinates = False<br>
<br>
then i tried to send both of them to coProcess<br>
<br>
dset1 = reader1.GetClientSideObject().GetOutputDataObject(0)<br>
dset2 = reader2.GetClientSideObject().GetOutputDataObject(0)<br>
<br>
coProcess(dset1, dset2, time, step, sys.argv[1])<br>
<br>
by adding extra argument to the coProcess routine and run it as follows<br>
<br>
cpscript.RequestDataDescription(datadescription)<br>
inputdesc1 = datadescription.GetInputDescriptionByName("input")<br>
if inputdesc1.GetIfGridIsNecessary() == False:<br>
return<br>
inputdesc1.SetGrid(grid1)<br>
<br>
datadescription.AddInput("input1")<br>
inputdesc2 = datadescription.GetInputDescriptionByName("input1")<br>
if inputdesc2.GetIfGridIsNecessary() == False:<br>
return<br>
inputdesc2.SetGrid(grid2)<br>
<br>
cpscript.DoCoProcessing(datadescription)<br>
<br>
but it is not working. Somehow, i need to add information about the 3 and<br>
4 dimensional fields to data description object. Right? Anyway, my<br>
question is that how could i send two different dataset to my<br>
visualisation pipeline (coproc_01.py).<br>
<br>
Thanks,<br>
Regards,<br>
<br>
--ufuk<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>