next up previous contents
Next: Compiling your program Up: IRAM Memo 2014-1 CLASS Previous: The Sic API   Contents

The Fortran API

Using the CLASS program is convenient in a development phase for testing, or for small projects, but in a production phase it may be better to use a program linked to the CLASS library with the dedicated Fortran API. The main advantages of this API is 1) that it does not use the SIC interpreted language (compiled code is faster) and 2) that it does not start the whole CLASS program mechanisms (e.g. command logging, graphic support, etc).

A demonstration program is presented in the Appendix [*]. This program does the same as the demo-telwrite.class procedure. Note that all subroutines using the Fortran API must use the module class_api. It provides CLASS types, parameters, and procedure interfaces. Here is a summary of the subroutines provided by the API:

The detailed API is available in the appendix [*]. It is the responsiblity of the calling program to instantiate a type(observation) variable and to pass them to the related subroutines. There is no global buffers or variables involved here, on purpose.



Subsections
next up previous contents
Next: Compiling your program Up: IRAM Memo 2014-1 CLASS Previous: The Sic API   Contents
Gildas manager 2023-06-01