AIRES library reference: getlgtrecord.

c     Routine directly callable from C/C++ (it could be necessary to
c     append an underscore, "_", to its name depending on the C/C++
c     compiler used).
      function getlgtrecord(fileid, currol, updown,
     +                      intfields, realfields, altrec, vrb, irc)
c     Reading records from a compressed logitudinal particle tracking
c     file and returning the read data in a "level per level" basis.
c     The position of the particle and its arrival time are corrected,
c     if needed, to match the correct values corresponding to the
c     current observing level (returned in variable currol).
c     Written by: S. J. Sciutto, La Plata 2002, 2010.
c     Arguments:
c     =========
c     fileid.......... (input, integer) Compressed file number. This
c                      parameter identifies the file to be used for
c                      reading, and is set by the file opening
c                      routine.
c     currol.......... (output, integer) Observing level crossed
c                      by the particle.
c     updown.......... (output, integer) Up-down indicator: 1 if the
c                      particle was going upwards, -1 otherwise.
c     intfields....... (output, integer, array(*)) Integer fields
c                      of the record. This includes the non-scaled
c                      quantities and (at the end) the date-time
c                      specification(s) (if any). The calling
c                      program must provide enough space for this
c                      array (The minimum dimension is the maximum
c                      number of fields that can appear in a record
c                      plus 1). Positions beyond the last integer
c                      fields are used as scratch working space.
c     realfields...... (output, double precision, array(0:*)) Real
c                      fields of the record. The calling program must
c                      provide enough space for this array.
c                      In the case of particle records, the position
c                      and time information can be corrected
c                      as needed accordingly with the observing
c                      level crossed.
c     altrec.......... (output, logical) True if the record is an
c                      alternative record. False if a default record
c                      was obtained.
c     vrb............. (input, integer) Verbosity control. If vrb is
c                      zero or negative then no error/informative
c                      messages are printed; error conditions are
c                      communicated to the calling program via the
c                      return code. If vrb is positive error messages
c                      will be printed: vrb = 1 means that messages
c                      will be printed even with successful operations.
c                      vrb = 2,3 means that only error messages will
c                      be printed. vrb > 3 is similar to vrb = 3, but
c                      with the additional action of stopping the
c                      program if a fatal error takes place.
c     irc............. (output, integer) Return code. 0 means that a
c                      default record was successfully read.
c                      i (i > 0) means that an alternative record of
c                      type i was successfully read. -1 means that an
c                      end-of-file condition was got from the
c                      corresponding file.  Any other value indicates
c                      a reading error (irc equals the system return
c                      code plus 10000).
c     Return value: (logical) True if a record was successfully read.
c     ============  False othwerise (EOF or I/O error).

These pages are maintained by
Sergio J. Sciutto
Back to AIRES library index
Back to AIRES home [HOME]