How to use time value in pipeline

I’m trying to find out how to use the time value in a pipeline script that is called every time step. Currently, the pipeline is created in

def CreateCoProcessor():
  def _CreatePipeline(coprocessor, datadescription):
    class Pipeline:
      # create pipeline here
      time = datadescription.GetTimeStep()
      # use time

unfortunately, it seems that this calling of the GetTimeStep() is only done on pipeline creation, while I would like to change pipeline settings based on the time value itself.

How to achieve this?

You can do that in DoCoProcessing function. coprocessor.Pipeline gives you access to the all the pipeline objects i.e. filters etc. create. You can modify params on them in DoCoProcessing as needed.

1 Like