next up previous contents
Next: About this document ... Up: IRAM Memo 2011-3 CLASS Previous: Conclusion   Contents

Implementation details for CLASS developers

The User Section is added to the CLASS data format. It is defined in the Fortran source as follows:

  type user  ! Type for all user subsections
     sequence
     integer(kind=4)          :: n       ! Number of user subsections
     type (user_sub), pointer :: sub(:)  ! Array of subsections
  end type
An object of type user is added to the type observation structure in the data format. This user object can contain an arbitrary number of subsections. This allows several user subsections to exist for the same observation.

Then each of these user subsection is described by the following type:

  type user_sub  ! Type for each user subsection
     sequence
     character(len=12)        :: owner    ! Owner of the subsection
     character(len=12)        :: title    ! Title of the subsection
     integer(kind=4)          :: version  ! Version of the subsection
     integer(kind=4)          :: ndata    ! Length of the data(:) array
     integer(kind=4), pointer :: data(:)  ! Place holder for information
  end type
Those two types are private to CLASS. They do not have to be known by the external program.

Finally, this new User Section is different from the other ones in the CLASS data format since its size is not constant. This implies some modifications in the subroutines. In particular, a whole copy of observation to observation (obsout = obsin) is forbidden: it must be done in a specific way, taking care of allocating the pointers in the user section before the copy. For the same reason, the User Section is not buffered and must be re-read everytime needed on the disk (in other words SET VIRTUAL ON has no effect).


next up previous contents
Next: About this document ... Up: IRAM Memo 2011-3 CLASS Previous: Conclusion   Contents
Gildas manager 2014-07-01