Version 7 (modified by mmaipsl, 13 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)
- 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.
- 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.
- 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.
- Special attention should be paid to flags that determine the modelling sequence, such flags should be documented and become searchable.
- 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:
- Robodoc http://www.xs4all.nl/%7Erfsber/Robo/robodoc.html
- Fordocu http://www.vortech.nl/en/software/fortran-documentation-generator/
- Doxygen http://www.stack.nl/~dimitri/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.
Version 1.6.2 of Doxygen has been compiled on obelix2 here :
/home/users/mmancip/PROG/doxygen-1.6.2
and installed in this directory :
/home/users/mmancip/PROG/bin
You can add this tool to your own environment (here in .login file for tcsh shell) :
setenv PATH /home/users/mmancip/PROG/bin:$PATH if ! ($?LD_LIBRARY_PATH) then setenv LD_LIBRARY_PATH /home/users/mmancip/PROG/lib else setenv LD_LIBRARY_PATH /home/users/mmancip/PROG/lib:${LD_LIBRARY_PATH} endif
A version 2.28.0 of graphviz set of tools has been installed in the same path. It contains last version of dot scheme builder.
Implementation (9/2011)
Martial coded a script that extents the functionality of Doxygen. The script allows
to tag blocks of code (@codeinc). 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 convert 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.
- 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.
- 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.
- Give full references of the scientific literature used in support of the code.
- Add flow charts to explain the structure of the (nested) if-then-else.
- Each variable/parameter has a standardized description containing the following fields: Variable name, Local/Global, Dimensions, units.
You can find an example of this demonstration on obelix2 in
/home/users/mmancip/PROG/ORCHIDEE_DOC_1_9_5_2/modeles/ORCHIDEE/docs
In latex subdirectory, you can find the refman.pdf file to be read with kpdf or acrobat. In html subdirectory, you will find the index.html to be oppened with your browser.
You can get modipsl, ORCHIDEE TOOLS as discribed in SubVersion? wiki page and get Martial version in modipsl/util directory with :
where_is_TOOLS/recup_my_ORCHIDEE my_svn_login perso/martial.mancip my_mail@lsce.ipsl.fr
and then go to
cd ../modeles/ORCHIDEE
and simply execute
./makeorchidee_fcm -doc
to get your own version of the martial trunk documentation.
Open questions
- 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. - 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. - 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. - 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. - 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, ...
- 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
- Present demonstration project at a reunion suivi (Fabienne & Martial)
- Refine documentation protocol (Sebastiaan, Fabienne & Martial)
- Develop additional functionality if essential for tier 1 documentation (Martial)
- Organise documentation retreat (12/2011?)
- We have to define standard header for all documented module. Martial has listed some header [attach:capsule.f90].
- Release and test tier 1 documentation.
First step commited in perso/Martial.Mancip branch (opened). - Plan for tier 2 documentation.
Attachments (19)
- capsule.f90 (9.0 KB) - added by mmaipsl 13 years ago.
- 1-Retreat_intro_111201.ppt (251.0 KB) - added by maignan 13 years ago.
- 2-ScientificDocumentation_111201_Part1.pdf (212.2 KB) - added by maignan 13 years ago.
- 2-ScientificDocumentation_111201_Part2.pdf (253.9 KB) - added by maignan 13 years ago.
- 2-ScientificDocumentation_111201_Part3.pdf (170.4 KB) - added by maignan 13 years ago.
- 3-Protocol_111201.doc (35.5 KB) - added by maignan 13 years ago.
- 4-Retreat_Workload_111201.doc (36.0 KB) - added by maignan 13 years ago.
- stomate_alloc.f90 (31.5 KB) - added by maignan 13 years ago.
- 3-Protocol_111202.doc (22.5 KB) - added by maignan 13 years ago.
- 4-Retreat_Workload_111202.doc (19.5 KB) - added by maignan 13 years ago.
- 2-ScientificDocumentation_111205_Part1.pdf (376.7 KB) - added by maignan 13 years ago.
- 2-ScientificDocumentation_111205_Part2.pdf (407.9 KB) - added by maignan 13 years ago.
- diffuco_trans_co2.f90 (28.1 KB) - added by maignan 13 years ago.
- libIGCM_config_1.zip (48.2 KB) - added by luyssaert 13 years ago.
- libIGCM_config_2.zip (48.2 KB) - added by luyssaert 13 years ago.
- libIGCM_config_3.zip (51.3 KB) - added by luyssaert 13 years ago.
- libIGCM_config_4.zip (51.3 KB) - added by luyssaert 13 years ago.
- libIGCM_config_5.zip (50.4 KB) - added by luyssaert 13 years ago.
- libIGCM_config_6.zip (50.3 KB) - added by luyssaert 13 years ago.