Version 6 (modified by mmaipsl, 10 years ago) (diff)


ORCHIDEE Documentation Work

Background (2010)

The current documentation of ORCHIDEE is incomplete, inconsistent in its level of detail, tri-lingual, fragmented and has been published in black, grey and white literature. Although considerable work has been done in the past, it is difficult for the current users to benefit from this work. The current organisation of the documentation is unlikely to attract new ORCHIDEE users and it is unlikely to meet any traceability or reproducibility standards required by modern science.

Aim (2010)

To reorganise, complete and harmonize the scientific and technical documentation of ORCHIDEE in a state-of-the-art searchable archive. The quality of this archive should be such that it satisfies the needs of the current users, attracts new users, the results become traceable and the simulation reproducible.

Guiding principles (2/2011)

  1. The user should be able to follow (by means of hyper-links) the computational chain from forcing to history file or the other way around.
  2. The documentation should be dynamic in that it is integrated into the svn system. Documentation and executables are compiled at the same time. The documentation reflects the version of the code that has been compiled.
  3. The documentation needs to serve multiple-purposes i.e. it is the basic information for beginners to get started but it should have additional functionality such that advanced ORCHIDEE users can use it as an analytical tool to understand model results.
  4. Special attention should be paid to flags that determine the modelling sequence, such flags should be documented and become searchable.
  5. The functionality of the documentation should work even when the documentation is incomplete. This gives time to improve and complete the content over time.

Software tool (5/2011)

Fabienne checked the functionality of the following software tools:

  1. Robodoc
  2. Fordocu
  3. Doxygen

It was decided to continue using Doxygen as the user community seems the largest (of the three tools) and the most active. In addition, new releases of Doxygen are made available regularly and the software currently has an extensive functionality.

Implementation (9/2011)

Martial coded a script that extents the functionality of Doxygen. The script allows to tag blocks of code. These blocks will end up in the documentation. This functionality was thought to be essential as it is the only way to make sure that the most recent changes to the code end-up in the documentation.
An Open Office plugin (writer2latex) is available to covert all type of Open Office files to Latex. Hence, existing documents can be easily transformed.

Demonstration (9/2011)

Fabienne will use existing and new functionalities of Doxygen to merge existing documentation with the phenology module. This will be a first example where attention will be paid to the content and appearance of the documentation. An initial set of rules has been defined but this set will most likely change following the experiences of Fabienne.

  1. Document the smallest possible units i.e. a line of code or a couple of lines. This approach ensures that following an initial effort it is a lot easier to keep the documentation up to date as there is a clear relationship between the documentation and the code.
  2. Have a scientific description at the start of the code. Avoid lengthy blocks of text because this is hard to maintain and will most likely get outdated pretty fast. It can also hamper readability of the code.
  3. Give full references of the scientific literature used in support of the code.
  4. Add flow charts to explain the structure of the (nested) if-then-else.
  5. Each variable/parameter has a standardized description containing the following fields: Variable name, Local/Global?, Dimensions, units.

Open questions

  1. Can the information of each variable be extended with a list of routines where it is used and calculated?
    No. Only routines are traced by Doxygen.
  2. Can the information of each variable be extended with a list of routines where the variable is used?
    No. Only routines are traced by Doxygen.
  3. Can the information of each variable be extended with a link to how and where it is initialized?
    No. Only routines are traced by Doxygen. And only global variables (in head of modules) have hyperlink.
  4. Doxygen has a graphical tool that shows the links between subroutines. Would something similar be possible to show the links between variables i.e. which functions make use of a certain variable? i.e. show everything that depends on lai (from lai to history files)
    No. Only routines are traced by Doxygen.
  5. Could we think of a set of rules to decide when we copy code to the documentation? Should we define a common vocabulary of verbs i.e. convert, transfer, transform, ...
  6. Could we set up a searchable database for variables (ecology based)? A searchable database of code-based variables is a basic functionality of Doxygen.

Future activities

  1. Present demonstration project at a reunion suivi (Fabienne & Martial)
  2. Refine documentation protocol (Sebastiaan, Fabienne & Martial)
  3. Develop additional functionality if essential for tier 1 documentation (Martial)
  4. Organise documentation retreat (12/2011?)
  5. We have to define standard header for all documented module. Martial has listed some header [attach:capsule.f90].
  6. Release and test tier 1 documentation.
    First step commited in perso/Martial.Mancip branch (opened).
  7. Plan for tier 2 documentation.

Attachments (19)