trend

- 4

Trapped Radiation ENvironment model Development

UD320

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

Name

    Subroutine UD320 - evaluate a double time integral over a drift shell

Synopsis

 
      REAL*8    rpar2, result, rnorm, rdrift
      INTEGER*4 kpar1, ifail
      EXTERNAL  zsub

      CALL UD320 (kpar1, rpar2, zsub, result, rnorm, rdrift, ifail)     

Arguments

    kpar1
    control parameter passed to zsub [in]
    rpar2
    control parameter passed to zsub [in]
    zsub
    external subroutine (see note) [in]
    result
    result of the integration [out]
    rnorm
    time integral of the unity [out]
    rdrift
    single time integral of the unity [out]
    ifail
    Error flag (see diagnostics) [out]

Description

    The subroutine UD320 is intended to average physical quantities over a magnetic drift shell. Before any call to this subroutine, a magnetic drift shell has to be traced with the help of subroutine UD310. As input, the subroutine accepts an external subroutine and two parameters to be passed to this subroutine. The synopsis of the subroutine is given in the note below and is similar to the synopsis of subroutine UD636. As result, the subroutine returns the value of the double time integral
    [Eq]
    evaluated over the magnetic drift shell for the function provided by the subroutine zsub (argument result) and for the unity (argument rnorm). The average over the drift shell is given then by result/rnorm. In this equation, ds and dl are elements of length along the field line and along the azimuthal drift direction, respectively. The denominators of ds and dl are proportional to the parallel velocity and the drift velocity, respectively. Since the drift time between two neighbouring field lines depends weakly on the position on the field line, the last factor of the integrant is evaluated only once for each field line (at the local magnetic equator).

    The argument rdrift returns the value of the single time integral

    [Eq]
    which is proportional to the drift period.

Note

    The synopsis of the external subroutine has to be the following:
          RECORD/zgeo/mpos
          RECORD/zvec/mb
          INTEGER*4 kpar1, ifail
          REAL*8 rpar2, fct
          
          CALL ZSUB (kpar1, rpar2, mpos, mb, fct, ifail)
    where the arguments kpar1 and rpar2 are control parameters, the arguments mpos and mb are the geographic (geocentric) location and the magnetic field vector where the function has to be evaluated, respectively. The subroutine ZSUB has to return the value of the evaluated function in argument fct. The argument ifail can be used to flag errors in the subroutine zsub. When the subroutine returns a negative value for the argument ifail, the computation is aborted.

    One should note that the synopsis has changed between version 2.00 and 2.01 (see history). Moreover, since version 2.01, the entry UD322 allows an array for argument fct.

References

  • Hassitt, A., Average effect of the atmosphere on trapped protons, JGR 70 (1965) 5385-5394
  • Heynderickx, D., Kruglanski, M., and Lemaire, J.F., A new tool for calculating drift shell averaged atmospheric density, in "Radiation Belts: Models and Standards", AGU Monograph 97 (1996) 173-178

History

    The subroutine UD320 does not exist in version 1.05 and earlier. The subroutine UD320 has been completely reviewed in version 2.01, as well as subroutine UD321. The major effects are the addition of a special entry (UD322) and a modification of the synopsis of the zsub external subroutine. In version 2.00 and earlier, the synopsis is
          CALL ZSUB (kpar1, rpar2, mpos, fct, ifail)
    (Before version 2.01, the argument mb was not included; see note for details). Note that subroutine UA636 has been also adapted.

Diagnostics

    -32001, invalid drift shell description
    -32002, invalid drift shell description

Common Blocks

    UC110, magnetic drift shell description
    UC120, magnetic field line description
    UC130, set of magnetic field line segments
    UC160, general constants

Dependencies

Called by

    None

Calls

    UD321, evaluate a time integral over a magnetic field line
    zsub, external subroutine (see Note)

See also

    UD310, trace a magnetic drift shell
    UA636, evaluate a weighted atmospheric mass

Reported Bugs

    None

Examples

    None