Skip to content

Latest commit

 

History

History
155 lines (80 loc) · 4.95 KB

makemaggriddh.pod

File metadata and controls

155 lines (80 loc) · 4.95 KB

MakeMagGridDH

MakeMagGridDH -

Create 2D cylindrical maps on a flattened ellipsoid of all three vector components of the magnetic field, the magnitude of the magnetic field, and the magnetic potential.

SYNOPSIS

SUBROUTINE MakeMagGridDH (

CILM, LMAX, R0, A, F, RAD, THETA, PHI, TOTAL, N, SAMPLING, LMAX_CALC, POT_GRID)

    REAL*8

    CILM(2, LMAX+1, LMAX+1), R0, A, F, RAD(2*LMAX+2, 2*LMAX+2), THETA(2*LMAX+2, 2*LMAX+2), PHI(2*LMAX+2, 2*LMAX+2), TOTAL(2*LMAX+2, 2*LMAX+2)

    INTEGER

    LMAX, N

    REAL*8, OPTIONAL

    POT_GRID(2*LMAX+2,2*LMAX+2)

    INTEGER, OPTIONAL

    SAMPLING, LMAX_CALC

DESCRIPTION

MakeMagGridDH will create 2-dimensional cylindrical maps from the spherical harmonic coefficients CILM, of all three components of the magnetic field, the total field strength, and the magnetic potential. The magnetic potential is given by

V = R0 Sum_{l=1}^LMAX (R0/r)^{l+1} Sum_{m=-l}^l C_{lm} Y_{lm}

and the magnetic field is

B = - Grad V.

The coefficients are referenced to a radius R0, and the function is computed on a flattened ellipsoid with semi-major axis A (i.e., the mean equatorial radius) and flattening F.

The default is to calculate grids for use in the Driscoll and Healy routines that are equally sampled (N by N), but this can be changed to calculate equally spaced grids (N by 2N) by setting the optional argument SAMPLING to 2. The input value of LMAX determines the number of samples, N=2*LMAX+2, and the latitudinal sampling interval, 90/(LMAX+1). The first latitudinal band of the grid corresponds to 90 N, the latitudinal band for 90 S is not calculated, and the latitudinal sampling interval is 180/N degrees. The first longitudinal band is 0 E, the longitudinal band for 360 E is not calculated, and the longitudinal sampling interval is 360/N for equally sampled and 180/N for equally spaced grids, respectively.

ARGUMENTS

CILM

(input) REAL*8, DIMENSION (2, LMAX+1, LMAX+1)

The real Schmidt semi-normalized spherical harmonic coefficients to be expanded in the space domain. The coefficients C1lm and C2lm refer to the "cosine" (Clm) and "sine" (Slm) coefficients, respectively, with Clm = CILM(1, l+1, m+1) and Slm = CILM(2, l+1, m+1). Alternatively, C1lm and C2lm correspond to the positive and negative order coefficients, respectively.

LMAX

(input) INTEGER

The maximum spherical harmonic degree of the coefficients CILM. This determines the number of samples of the output grids, N=2*LMAX+2, and the latitudinal sampling interval, 90/(LMAX+1).

R0

(input) REAL*8

The reference radius of the spherical harmonic coefficients.

A

(input) REAL*8

The semi-major axis of the flattened ellipsoid on which the field is computed.

F

(input) REAL*8

The flattening of the reference ellipsoid: i.e., F = (R_equator - R_pole) / R_equator = (A - B) / A.

RAD

(output) REAL*8, DIMENSION(2*LMAX+2, 2*LMAX+2) or (output) REAL*8, DIMENSION(2*LMAX+2, 4*LMAX+4)

A 2D equally sampled (N by N) or equally spaced (N by 2N) grid of the radial component of the magnetic field corresponding to the input spherical harmonic coefficients CILM. The first latitudinal band corresponds to 90 N, the latitudinal band for 90 S is not included, and the latitudinal sampling interval is 180/N degrees. The first longitudinal band is 0 E, the longitudinal band for 360 E is not included, and the longitudinal sampling interval is 360/N for an equally sampled and 180/N for an equally spaced grid, respectively.

THETA

(output) REAL*8, DIMENSION(2*LMAX+2, 2*LMAX+2) or (output) REAL*8, DIMENSION(2*LMAX+2, 4*LMAX+4)

A 2D equally sampled or equally spaced grid of the theta component of the magnetic field.

PHI

(output) REAL*8, DIMENSION(2*LMAX+2, 2*LMAX+2) or (output) REAL*8, DIMENSION(2*LMAX+2, 4*LMAX+4)

A 2D equally sampled or equally spaced grid of the phi component of the magnetic field.

TOTAL

(output) REAL*8, DIMENSION(180/INTERVAL+1, 360/INTERVAL+1)

A 2D equally sampled or equally spaced grid of the total magnetic field strength.

N

(output) INTEGER

The number of samples in latitude of the output grids. This is equal to 2*LMAX + 2, which will always be even.

SAMPLING

(input) INTEGER, OPTIONAL

If 1 (default) the output grids are equally sampled (N by N). If 2, the grids are equally spaced (N by 2*N).

LMAX_CALC

(input) INTEGER, OPTIONAL

The maximum spherical harmonic degree used in evaluating the functions. This must be less than or equal to LMAX.

POT_GRID

(output) REAL*8, DIMENSION(2*LMAX+2, 2*LMAX+2), OPTIONAL or (output) REAL*8, DIMENSION(2*LMAX+2, 4*LMAX+4), OPTIONAL

A 2D equally sampled or equaly spaced grid of the magnetic potential.

SEE ALSO

http://shtools.ipgp.fr/

COPYRIGHT AND LICENSE

Copyright 2012 by Mark Wieczorek <wieczor@ipgp.fr>.

This is free software; you can distribute and modify it under the terms of the revised BSD license.