covarying cylc parameters

21 views
Skip to first unread message

Whitcomb, Mr. Tim

unread,
Dec 1, 2018, 3:48:57 PM12/1/18
to cy...@googlegroups.com
I wonder if there's a more elegant solution to the problem below:

1. I have a set of satellite sensors and the satellite platforms that they are on.
2. Some tasks care about the sensor only, some tasks care about the satellite only, and some tasks care about the combination
3. Tasks that only care about the sensor or satellite are easily handled using Cylc parameters
4. The current Cylc parameter combinations results in a Cartesian product of satellites and sensors, not all of which are valid

The problem is that there is some limits on the product of the two parameter lists, and I'm trying to find an easy way to codify that as having the parameter notation in the graph *really* makes it look nice. So far best thing I have come up with to implement is to use a combination of Jinja templating with the Cylc parameters to generate a few parallel subset lists that are used instead, but that seems a little messy. Is there a better solution to saying "this set of parameters goes with that subset of those parameters"?

Tim

Hilary Oliver

unread,
Dec 1, 2018, 6:36:32 PM12/1/18
to cy...@googlegroups.com
Hi again Tim!

> current Cylc parameter combinations results in a Cartesian product of satellites and sensors, ...

Yes, foo<m,n> is equivalent to a nested loop over m and n - because built-in task parameters are intended as a clean replacement for messy Jinja2 loops.  Given that your use case is more complex than that, then yes, you would have to revert to Jinja2 templating, or a combination or Jinja2 and parameters. 

I'm inclined to think there are diminishing returns (relative to effort) from trying to replace increasingly niche uses of Jinja2 with built-in functionality. But if you can give us a concrete example of what  you want, we might consider it.  Otherwise, stick with Jinja2 (or EmPy) - or wait for the future suite configuration Python API!

Hilary







--

---
You received this message because you are subscribed to the Google Groups "cylc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cylc+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages