The DaSystem class is found in the module :mod:`dasystem`, or in a specific implementation under the da/ source tree. It is derived from the standard python :class:`dictionary` object.
It describes the details of the data assimilation system used (i.e., CarbonTracker, or CT Methane, or ....).
An example rc-file for CarbonTracker is:::
!!! Info for the CarbonTracker data assimilation system
correctly. The first one refers to the rc-file (2) described above, while the second one refers to the rc-file you used to compile the TM5 model in :ref:`Chapter 0 <tut_chapter0>`.
Where the ``da.rc`` file is rather self-explanatory, the ``carbontracker.rc`` file has keys that refer to the inner workings of CTDAS as described in :mod:`dasystem`
These specify files, or paths to files, that are needed to construct the :ref:`statevector <Statevector>` object and the
:ref:`observations <Observation>` object. For instance, they allow CTDAS to map parameters to the global grid, or to
...
...
@@ -45,15 +45,15 @@ construct model-data-mismatches for the sites that will be used in the assimilat
fact that they are missing.
Modify the primary run script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Step 2: Modify the python run script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The primary run script for CTDAS is simply called ``das.py`` and can also be found in the ``da/examples/`` subdirectory. As before,
you should copy this file before modyfing it.
You are required to create your own python run script for CTDAS. In this tutorial, we assume it is simply called ``das.py`` and an example
is checked out in the ``da/tools/`` trunk directory. As before, you should copy this file before modyfing it.
.. note:: The primary run script needs to be located in the main directory of the CTDAS tree, i.e., ``${yourdir}/da/ct/trunk/``
The header of this script can contain settings that are needed to run it on your platform (e.g., queue flags), and is then followed by
The script first initializes some python objects needed to log activity and to parse command line arguments, and is then followed by
a block where all the modules that are needed in your experiment are imported. The example below shows the import of several classes that
are needed to run the CarbonTracker CO2 system on a computer referred to as MaunaLoa, using TM5 as
an :ref:`observationoperator <Observation Operator>` ::
...
...
@@ -69,28 +69,30 @@ an :ref:`observationoperator <Observation Operator>` ::
from da.tm5.observationoperator import TM5ObservationOperator
from da.ct.optimizer import CtOptimizer
Once the classes are loaded successfully, the objects can be created. Note how the 2nd and 3rd object make use of rc-files! ::
Once the classes are loaded successfully, the objects are created. ::