1 function B_mag = B_Dip(R, lambda, B0)
3 % B_DIP calculates dipole magnetic field in equatorial plane
6 % R - radial distance, Re
7 % lambda - latitude, rad (lambda = 0 if not specified)
8 % B0 - (optional) magnetic field at Earth's surface in Gauss
11 % B_mag - magnetic field in Gauss
13 % Author: Dmitriy Subbotin
14 % Email: subbotin@ucla.edu
15 % Last change: 20014-01-01 by Dmitriy Subbotin
16 % The work was supported by:
17 % LANL grant 12-LR-235337, PI Yuri Shprits
18 % NASA grant NNX09AF51G, PI Yuri Shprits
27 %B_r = -2 * B0 ./ (L.^3) .* sin(lambda);
28 %B_t = -B0 ./ (L.^3) .* cos(lambda);
29 B_mag = B0 ./ (R.^3) .* sqrt(1 + 3 * sin(lambda).^2) ./ cos(lambda).^6;
functions for write log and support files. Functions are defined in Output.h and descripted in Output...