Skip to content
C2SMPublic

About

Climate and Weather workflow tool with explicit data representation and ahead of time job submission

Resources

Stars

7 stars

Watchers

3 watching

Forks

Repository files navigation

Sirocco logo Sirocco logo

Documentation · Getting started · Changelog

Sirocco is a Python workflow tool for climate and weather applications running on HPC systems. Workflows are described in a YAML dialect inspired by Cylc and AiiDA, and unrolled into a graph of tasks and data.

  • Data as graph nodes. Tasks explicitly declare the data they consume and produce, through named ports. No task needs to make assumptions on where others read or write, so workflows are truly composable.
  • Cycles. Recurring sets of tasks with their own periodicity, so that describing climate and weather workflows feels natural.
  • Parameters. Ensemble and sensitivity experiments through parameterized tasks and data.
  • Deep propagating task front. Tasks are submitted ahead of time, chained by scheduler dependencies, in a window that moves through the graph as tasks complete. Tasks no longer wait for their parents to finish before entering the queue.
  • Plugins. A general purpose shell plugin and a dedicated plugin for the ICON model, covering complex setups such as coupled runs on hybrid CPU/GPU architectures.
  • Two engines. A standalone engine running autonomously on the HPC system, with the scheduler as the sole daemon, and an AiiDA based engine (under development) running on a dedicated server.

Example

An ICON atmosphere simulation running month by month, restarting from its previous state, with its output streams post-processed by a user script:

scheduler: slurm
cycles:
  - monthly:
      cycling:
        start_date: "2000-01-01T00:00"
        stop_date: "2000-07-01T00:00"
        period: "P1M"
      tasks:
        - icon:
            components:
              atm:
                inputs:
                  dynamics_grid_file: [icon grid]
                  restart_in:
                    - restart:
                        when:
                          after: "2000-01-01T00:00"
                        target_cycle:
                          lag: "-P1M"
                outputs:
                  restart_out: [restart]
                  output_streams: [atm 2d, atm 3d]
        - post proc:
            inputs:
              streams: [atm 2d, atm 3d]
            outputs:
              diagnostics: [diagnostics]
tasks:
  - ROOT:
      computer: santis
      account: my_account
      walltime: "01:00:00"
  - SIROCCO:  # For the standalone orchestration engine
      walltime: "00:05:00"
      venv: /path/to/sirocco/.venv
  - icon:
      plugin: icon
      uenv: icon/25.2:v3
      nodes: 4
      procs_per_node: 128
      exe:
        cpu:
          path: /path/to/icon
          procs:
            atm:
              compute_weight: 1
              streams: 2
      namelists:
        - ICON/icon_master.namelist
        - ICON/NAMELIST_exclaim_ape_R02B04
  - post proc:
      plugin: shell
      src: scripts/post_proc.sh
      command: ./post_proc.sh {PORT::streams}
data:
  available:
    - icon grid:
        path: /path/to/icon_grid_0013_R02B04_R.nc
  generated:
    - restart: {}
    - atm 2d: {}
    - atm 3d: {}
    - diagnostics:
        path: diagnostics

The namelists are files of the configuration directory, next to sirocco.yaml. See the configuration and ICON plugin documentation for the complete syntax.

Getting started

Sirocco requires Python >=3.12 and, for the standalone engine, an HPC system using the SLURM scheduler (currently the only supported one). Install it on the HPC system, preferably with uv:

uv pip install sirocco

Then, from the configuration directory (containing sirocco.yaml):

sirocco verify      # validate the configuration
sirocco visualize   # render the unrolled workflow graph as an svg
sirocco start       # start the workflow
sirocco stviz       # render the current state of the task front

See Usage for all commands, including stop and restart.

The AiiDA engine requires a development install (git clone then uv sync --group aiida or hatch shell), see the AiiDA engine documentation.

Development

Sirocco uses hatch to manage environments:

git clone https://github.com/C2SM/Sirocco.git
cd Sirocco
hatch test                # run the tests
hatch test --all          # run the tests on all supported Python versions
hatch check fmt           # check formatting
hatch check code          # lint
hatch run types:check     # type check
hatch run docs:serve      # live preview of the documentation

Contact

For questions about Sirocco or to discuss a use case, contact Matthieu Leclair. For bugs and feature requests, please open an issue.

License

Sirocco is released under the MIT license.

Acknowledgments

We would like to acknowledge the EXCLAIM and Swiss Twins projects for the initial funding of Sirocco.

About

Climate and Weather workflow tool with explicit data representation and ahead of time job submission

Resources

Stars

7 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages