.. _timesync2_rst: timesync2 ============================= Two models, A & B, run simulations over time and exchange data via a timestep synchronization communication pattern. The timesync model `statesync` is explicit in the YAML and allows for specific control of the synchronization (e.g. relationship between variables, interpolation, aggregation). The models compute different variables, have different timesteps, and output data at each time step to a file. This example demonstrates more advanced use of the timesync communication pattern and YAML parameters. .. contents:: :local: C Version --------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.c :language: c :linenos: Model YAML: .. literalinclude:: /temp/timesync2_c.yml :language: yaml :linenos: C++ Version ----------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.cpp :language: c++ :linenos: Model YAML: .. literalinclude:: /temp/timesync2_cpp.yml :language: yaml :linenos: Fortran Version --------------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.f90 :language: python :linenos: Model YAML: .. literalinclude:: /temp/timesync2_fortran.yml :language: yaml :linenos: Julia Version ------------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.jl :language: python :linenos: Model YAML: .. literalinclude:: /temp/timesync2_julia.yml :language: yaml :linenos: Matlab Version -------------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.m :language: matlab :linenos: Model YAML: .. literalinclude:: /temp/timesync2_matlab.yml :language: yaml :linenos: Python Version -------------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.py :language: python :linenos: Model YAML: .. literalinclude:: /temp/timesync2_python.yml :language: yaml :linenos: R Version --------- Model Code: .. literalinclude:: /../../../../../../../opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/yggdrasil/examples/timesync2/src/timesync.R :language: python :linenos: Model YAML: .. literalinclude:: /temp/timesync2_r.yml :language: yaml :linenos: