eophis package

Subpackages

Submodules

eophis.loop module

This module contains time loop structures to synchronize connexions between coupled scripts.

eophis.loop.all_in_all_out(earth_system, step, niter)

Build a Loop on All In All Out (AIAO) structure. assembler() function inserts router() inside base_loop() in which receivings and sendings steps are pre-defined.

Parameters:
  • earth_system (eophis.Tunnel) – coupling Tunnel to perform exchanges with earth

  • step (int) – loop time step, in seconds

  • niter (int) – number of loop iteration

Returns:

base_loop – AIAO loop completed with router()

Return type:

function

Raises:
  • eophis.abort() – if no router defined to construct loop

  • eophis.abort() – if loop starts with tunnels not ready

Notes

An AIAO loop orchestrates the following steps:
  1. receive all data from earth

  2. transfert data to models (provided from router())

  3. send back all results

Example

>>> @all_in_all_out(coupledEarth,timeStep,timeIter)
>>> def router(**inputs):
>>>     outputs = {}
>>>     outputs[varToSendBack] = my_model(inputs[varReceived])
>>>     return outputs
eophis.loop.starter(loop_router)

Starter for Loop-Router assembly.

Parameters:

assembled_loop (function) – Loop-Router to start

Module contents

EOPHIS

Eophis is a collection of tools to deploy Python written scripts for coupled execution with Fortran/C written physics-based models.

Available subpackages

coupling

tools to setup coupling environment

utils

miscellaneous operating tools