CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 3 forks source link

Use Jinja for job script rendering. #251

Closed bschroeter closed 7 months ago

bschroeter commented 7 months ago

Following discussions with @ccarouge yesterday...

The job script is currently rendered by interpolating a multi-line string in the source code. It would be cleaner to use a Jinja template which is loaded from the data directory and interpolate from there.

Jinja will also enable "in-template" conditional statements, allowing us to alter the rendering routing to remove things like $PROJECT flags.

The other benefit is that using Jinja will enable us to abstract many of the shell commands into template strings, opening opportunities to completely change the subprocess commands down the track if needed.