|
3 | 3 | About xarray-simlab
|
4 | 4 | ===================
|
5 | 5 |
|
6 |
| -xarray-simlab provides a framework for easily building custom models from a set |
7 |
| -of re-usable components (i.e., Python classes), called processes. |
| 6 | +xarray-simlab provides a framework for easily building custom computational |
| 7 | +models from a set of re-usable components (i.e., Python classes), called |
| 8 | +processes. |
8 | 9 |
|
9 |
| -The framework handles issues that scientists who develop models should not care |
10 |
| -too much about, like a model interface and its data structure as well as its |
11 |
| -overall workflow management. Both are automatically determined from the |
12 |
| -succint, declarative-like interfaces of the model processes. |
| 10 | +The framework handles issues that scientists who are developing models should |
| 11 | +not care too much about, like the model interface - including the data structure |
| 12 | +used - and the overall workflow management. Both are automatically determined |
| 13 | +from the succint, declarative-like interfaces of the model processes. |
13 | 14 |
|
14 |
| -Next versions of xarray-simlab will hopefully also handle other technical issues |
15 |
| -like logging, command line integration and running (many) simulations in |
16 |
| -parallel. |
| 15 | +Next versions of xarray-simlab will hopefully handle other technical issues |
| 16 | +like logging simulation progress, command line integration and running (many) |
| 17 | +simulations in parallel. |
17 | 18 |
|
18 | 19 | Motivation
|
19 | 20 | ----------
|
| 21 | + |
20 | 22 | xarray-simlab is being developped with the idea of reducing the gap between the
|
21 |
| -environment used for building and running a computational model and the one(s) |
| 23 | +environments used for building and running computational models and the ones |
22 | 24 | used for processing and analysing simulation results. It also encourages
|
23 | 25 | building new models from re-usable components and avoid reinventing the wheel.
|
24 | 26 |
|
25 |
| -Ultimately, it should reduce the time lag between the ideas that scientists have |
26 |
| -on how to model a particular phenomenon and the insights they get from exploring |
27 |
| -the behavior of the model, which often itself lead to new modeling ideas. |
| 27 | +The design of this tool is mainly focused on fast development and simulation |
| 28 | +setting(s), which would ultimately optimize the iterative, back-and-forth |
| 29 | +process between ideas on how to model a particular phenomenon and insights |
| 30 | +from the exploration of model behavior. |
28 | 31 |
|
29 | 32 | Sources of inspiration
|
30 | 33 | ----------------------
|
31 | 34 |
|
32 |
| -- xarray_: data structure |
33 |
| -- dask_: build and run task graphs (DAGs) |
34 |
| -- luigi_: use Python classes as re-usable units that help building complex |
35 |
| - workflows. |
36 |
| -- django_: especially The Django's ORM part (i.e., django.db.models) for the |
37 |
| - design of Process and Variable classes |
38 |
| -- param_: another source of inspiration for Process interface and Variable objects. |
39 |
| -- climlab_: another python package for process-oriented modeling, applied to |
40 |
| - climate. |
| 35 | +xarray-simlab leverages the great number of packages that are part of the |
| 36 | +Python scientific ecosystem. More specifically, the packages below have been |
| 37 | +great sources of inspiration for this project. |
| 38 | + |
| 39 | +- xarray_: xarray-simlab actually provides an xarray extension for setting and |
| 40 | + running models. |
| 41 | +- luigi_: the concept of Luigi is to use Python classes as re-usable units that |
| 42 | + help building complex workflows. xarray-simlab's concept is similar, but |
| 43 | + here it is specific to computational (numerical) modeling. |
| 44 | +- django_ (not really a scientific package): the way that model processes are |
| 45 | + designed in xarray-simlab is heavily inspired from Django's ORM (i.e., the |
| 46 | + ``django.db.models`` part). |
| 47 | +- param_: another source of inspiration for the interface of processes |
| 48 | + (more specifically the variables that it defines). |
| 49 | +- climlab_: another python package for process-oriented modeling, which uses |
| 50 | + the same approach although having a slightly different design/API, and which |
| 51 | + is applied to climate modeling. |
| 52 | +- dask_: represents fine-grained processing tasks as Directed Acyclic Graphs |
| 53 | + (DAGs). xarray-simlab models are DAGs too, where the nodes are interdepent |
| 54 | + processes. In this project we actually borrow some code from dask |
| 55 | + for resolving process dependencies and for model visualization. |
41 | 56 |
|
42 | 57 | .. _xarray: https://github.com/pydata/xarray
|
43 | 58 | .. _dask: https://github.com/dask/dask
|
44 | 59 | .. _luigi: https://github.com/spotify/luigi
|
45 | 60 | .. _django: https://github.com/django/django
|
46 | 61 | .. _param: https://github.com/ioam/param
|
47 | 62 | .. _climlab: https://github.com/brian-rose/climlab
|
48 |
| - |
49 |
| -**Draft: put this in create models section** |
50 |
| - |
51 |
| -The framework consists of a few base classes, e.g., :py:class:`xrsimlab.Variable`, |
52 |
| -:py:class:`xrsimlab.Process` and :py:class:`xrsimlab.Model`. The latter class |
53 |
| -represents a model with which we interact using the xarray's |
54 |
| -:py:class:`xarray.Dataset` structure. |
55 |
| - |
56 |
| -Variable.state (or value, rate, change) should not be used (get/set) outside |
57 |
| -of Process subclasses. |
58 |
| - |
59 |
| -ForeignVariable.state return the same object (usually a numpy array) than |
60 |
| -Variable.state (replace class names by variable names in processes). |
61 |
| -ForeignVariable.state is actually a shortcut to ForeignVariable.ref_var.state. |
|
0 commit comments