ecFlow's documentation is now on readthedocs!

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

The notebook code can be downloaded.

The following notebook is closer to the tutorial, with head.h, tail.h and task template managed directly by the designer.

import ecf
from ecf import *

home = os.getenv("HOME") + "/ecflow_server"
user = os.getenv("USER")

node = Suite("lorenz").add(
    Defstatus("suspended"),
    ecf.Edit(ECF_HOME=home, ECF_INCLUDE=home + "/include", ECF_FILES=home + "/files",
             ECF_OUT=home, 
             ECF_EXTN=".ecf", USER=user, SCHOST="localhost",
 ECF_JOB_CMD="/home/ma/emos/bin/trimurti %USER% %SCHOST% %ECF_JOB% %ECF_JOBOUT%"),
    ecf.Family("ecf").add(
            Task("compute").add(),
        
    ecf.Family("multi").add(  # once imported, alter script, run multiple tasks
           [ecf.Family("%02d" % num).add(
              Edit(XYZ="[%d.0, %d.0, %d.0]" % (num, num, num)),
              Task("compute"))
            for num in xrange(0, 5)])))
client = ecf.Client("localhost@2500")
defs = ecf.Defs()
defs.add_suite(node)
client.replace("/lorenz", defs)


jupyter notebook ecflow-jupyter-ecf-2018.ipynb
  • No labels