trend

- 4

Trapped Radiation ENvironment model Development

UT985

[ Name | Synopsis | Arguments | Description | Diagnostics | Common Blocks | Dependencies | See Also | Reported Bugs | Examples ]

Name

    Subroutine UT985 - transfer a field line of the drift shell to IDL

Synopsis

      INTEGER*4     kindex, klength
      RECORD /zseg/ mdata(*)
      
      CALL UT985 (kindex, klength, mdata )

Arguments

    kindex
    Field line segment index [in]
    klength
    Number of elementary segments [in/out]
    mdata
    Field line segment description [out]

Description

    The subroutine UT985 provides a bridge to transfer magnetic field line segment from the UNILIB libray to an IDL programme. The behaviour of the subroutine is function of the argument kindex.
    • when kindex=0, the magnetic field line segment stored in the common block UC170 is copied in argument mdata;
    • otherwize, one of the magnetic field line segments stored in the common blocks UC110, UC120 and UC130 is copied in argument mdata.
    To transfer a whole drift shell, the subroutine UT985 has to be called as many times as the number of magnetic field line segments included in the shell. When kindex=-1, the first field line segment of the drift shell is transfered. As output, the argument kindex returns the index of the next field line segment in the drift shell.

    As input, the argument klength has to be set to the number of elements available in argument mdata. When the field line segment contains a number of elementary segments larger than klength, the argument klength is set to this minimum and no data is assigned to argument mdata. Otherwize the argument klength is returned with the exact number of elementary segments and the magnetic field line segments are copied into argument mdata.

Diagnostics

    When an error occurs in subroutine UT985, the value -999999999 is assigned to argument klength.

Common Blocks

    UC110, magnetic drift shell description
    UC120, magnetic field line description
    UC130, set of magnetic field line segments
    UC170, temporary magnetic field line

Dependencies

Called by

    None

Calls

    None

See also

    None

Reported Bugs

    v1.05, Malfunction when field line extended to foot points; fixed in next versions

Examples

    #6, visualisation of a drift shell