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