Cylc parametrization for N members

I am using the cylc parametrization to run an ensemble of forecasts. This seems to work well when I hard code the number of ensemble members in the parameter. Is there some way, using Jinja or similar, that I can specify the number of ensemble members? Or do I just have to stick with ens = 0…17?

Yes, you can use a jinja2 variable to specify the number of ensemble members:
You can then set or override the value of this variable when you run the workflow using the --set option:

Hi @EmilyLane,

We use Jinja2 as a pre-processor to programmatically construct the suite.rc file seen by Cylc. As such, you can can use it to compute and set absolutely anything in your suite configuration. To Jinja2 the suite.rc file content is nothing but a bunch of arbitrary text.

To drive home the point, consider the initial cycle point config item:

{% set xxx = 'nit' %}
i{{xxx}}ial cycle point = 2020

This results in a valid config file, but {% set xxx = 'nut' %} would not.

You can use cylc view -j to see the result of Jinja2 pre-processing.

Jinja2 variable values can be set in the file (as in my example here) or as @dpmatthews notes Jinaj2 variables passed in as input via the cylc COMMAND --set command line option. (Or in a file, with the --set-file=FILE option).