European Space Agency

European Space Agency

Royal Belgian Institute for Aeronomy

Royal Belgian Institute for Aeronomy

../_images/whiteSpace.png

uf422 - follow a field line until a boundary condition is reached

subroutine  uf422(kdir, fbm, falt, scale, mpos, jind, ifail)
Parameters:
  • kdir [integer4,in] :: Direction indicator (-1, +1 or 0).

  • fbm [real8,in] :: Boundary condition on B.

  • falt [real8,in] :: Boundary condition on the altitude.

  • scale [real8,in/out] :: Scale factor (its sign gives the direction checked by kdir).

  • mpos [zgeo,out] :: Geographic location where a condition is reached.

  • jind [integer4,out] :: Index into the common block uc170.

  • ifail [integer4,out] :: error flag (see Diagnostics)

Description

The subroutine uf422() builds a magnetic field line segment until one of the following boundary conditions is reached:

  • the field line reached the altitude falt;

  • the field line reached the magnetic field intensity fbm.

The precision are set by the arguments epskm and epsrel of the common block uc190, respectively. The condition on the altitude is not checked when the argument falt is lower than -500.

The direction, in which the magnetic field line is followed, is controlled by the argument kdir. When kdir is equal to 1, the magnetic field line is traced in the direction of the increasing magnetic field intensities. When kdir is equal to -1, the magnetic field line is traced in the direction of the decreasing magnetic field intensities. In both cases, the sign of the scale factor scale is adapted by the subroutine. When kdir is equal to 0, the sign of the argument scale is not modified and the magnetic field line is traced in the same direction as the direction of the previous call to the subroutine.

As result, the subroutine returns the geographic location (mpos) and the corresponding index (jind) in the common block uc170 where the first boundary condition is reached. When no error occurs during the whole process, the kind of the boundary condition is returned by the argument ifail. Note that the subroutine uf422() does change the absolute value of the argument scale.

History

  • From version 1.13 to 2.00, the algorithm of the subroutine has been improved for the case where the starting point is close to the point along the field line with the minimum of magnetic field intensity.

Diagnostics

  • -42201, invalid value of the scale argument

  • -42202, reach a minimum of B which is not compatible with the boundary conditions

  • -42203, -42204, not used

  • -42205, cannot follow the desired direction due to an extremum of B

If the subroutine UF422 succeeds, the argument ifail is set to

  • 100: the magnetic field intensity fbm has been reached;

  • 200: the altitude falt has been reached;

  • 300: both conditions.

These values can be incremented by

  • 1: when the altitude of the starting point is falt;

  • 2: when the magnetic field intensity at the starting point is equal to fbm;

  • 10: when an extremum of magnetic field intensity has been met along the field line ;

  • 30: when the boundary condition corresponds to a maximum of the magnetic intensity;

  • 50: when the boundary condition corresponds to a minimum of the magnetic intensity.

Common Blocks

Dependencies

Called by

Calls

See also

None

Reported Bugs

None

Examples

None


UNILIB/tags/v3.02