-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. _create_model: | ||
|
||
Creating models | ||
=============== | ||
|
||
(WIP) | ||
|
||
The framework provides a few Python base classes, e.g., | ||
:class:`~xrsimlab.Variable`, :class:`~xrsimlab.Process` and | ||
:class:`~xrsimlab.Model` that can used togheter to create fully operational | ||
models. | ||
|
||
A ``Model`` is a collection of processes that each define an interface with the | ||
all the "public" variables it needs, update or provide for its proper | ||
computation. | ||
|
||
Process | ||
------- | ||
|
||
|
||
|
||
Variable | ||
-------- | ||
|
||
Generally, the ``state``, ``value``, ``rate`` and ``change`` properties should | ||
not be used (either get or set the value) outside of Process subclasses, | ||
or maybe only for debugging. | ||
|
||
Foreign Variable | ||
~~~~~~~~~~~~~~~~ | ||
|
||
ForeignVariable.state return the same object (usually a numpy array) than | ||
Variable.state (replace class names by variable names in processes). | ||
ForeignVariable.state is actually a shortcut to ForeignVariable.ref_var.state. | ||
|
||
Variable List and Group | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
Model | ||
----- | ||
|
||
The latter class represents a model with which we interact using the xarray's | ||
:class:`~xarray.Dataset` structure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. _run_model: | ||
|
||
Running models | ||
============== | ||
|
||
(TODO) |