- 4

Trapped Radiation ENvironment model Development


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


    Subroutine UF423 - Runge Kutta step


      REAL*8    scale, rc, pb, palt   
      INTEGER*4 ifail 
      CALL UF423 (scale, rc, pb, palt, ifail)     


    Scale factor [in]
    Radius of curvature [in/out]
    Magnetic field intensity at the reached point [out]
    Altitude of the reached point [out]
    Error flag (see diagnostics) [out]


    The subroutine UF423 carries out a Runge-Kutta step along a magnetic field line. The initial conditions and results of the Runge-Kutta step are stored in the common block UC170. The index kgp of this common block defines the starting point.

    The step size is proportional to the radius of curvature rc and to the scale factor scale, with a possible correction to comply with a minimum and maximum value. The arguments prop, stpmin and stepx of the common block UC190 define the factor of proportionality, the minimum and the maximum of the step size, respectively.

    Note that the argument rc is re-evaluated for the next step.

    The subroutine uses the Gill's method to apply a fourth-order Runge-Kutta step. When the subroutine returns the error flag ifail equal to -42305 or -42306, it has correctly applied the Runge-Kutta step, but possible causes of uncertainties have been detected.

    The table below indicates in which way the arguments of the common block UC170 are used. Note that when the subroutines succeeds, the index kgp is increased by 1.

    mele(kgp).beg.coordinput geographic location of the starting point
    mele(kgp).beg.binput magnetic vector at the starting point
    mele(kgp).arclinput arc length to the starting point
    mele(kgp).beg.rcurvoutput Radius of curvature at the starting point
    mele(kgp).rkstpoutput intermediate points of Runge-Kutta step
    mele(kgp+1).beg.coord output geographic location of the next point
    mele(kgp+1).beg.boutput magnetic vector at the next point
    mele(kgp+1).arcloutput arc length to the next point


  • Davis, P.J. and Polonsky, I.,Numerical interpolation, differentiation and integration, in Handbook of Mathematical Functions, edited by Abramowitz, M. and Stegun, I.A., 875
  • Gill, S., A process for the step-by-step integration of differential equations in an automatic digital computing machine, Proceedings of the Cambridge philosophical society 47 (1951) 96-108


    The error codes -42304 to -42306 are not generated in version 2.02 ans earlier.


    -42301, no more place in the common block UC170
    -42302, too small value of the scale argument
    -42303, too large value of the scale argument
    -42304, uncertainties on the magnetic field vector evaluation (see error flag -53004 of subroutine UM530)
    -42305, uncertainties on the magnetic field vector evaluation (see error flag -53002 or -53003 of subroutine UM530)
    -42306, uncertainties on the validity of the Runge Kunta step

Common Blocks

    UC160, general constants
    UC170, temporary magnetic field line
    UC190, control parameters, set 1


Called by

    UD328, evaluate the second derivative of B
    UF422, follow a field line until a boundary condition is reached
    UF424, search the lowest B value
    UF426, interpolating an extremum of B
    UF427, interpolating a value of B
    UF428, interpolating an altitude
    UT998, evaluate the magnetic field vector and the normal to the field line


    UM530, evaluate the magnetic field vector
    UF425, evaluate the curvature of the field lines

See also


Reported Bugs